ymaps.ready(function() {
const mapCenter = [55.76, 37.64];
const cities = [{
title: 'Москва',
coordinates: [55.753215, 37.622504]
}, {
title: '59.939095, 30.315868',
coordinates: [55.753215, 37.622504]
}];
const Map = new ymaps.Map("map", {
center: mapCenter,
zoom: 5,
controls: ['zoomControl']
}, {
searchControlProvider: 'yandex#search'
});
cities.forEach(function(city) {
const Marker = new ymaps.Placemark(city.coordinates, {
balloonContent: '<strong>' + city.title + '</strong>'
}, {
preset: 'islands#icon',
iconColor: '#0095b6'
});
Map.geoObjects.add(Marker);
});
ymaps.geocode('omsk', {
results: 1
}).then(function(res) {
Map.setCenter(
res.geoObjects.get(0).geometry.getCoordinates()
);
});
});