Answer the question
In order to leave comments, you need to log in
How to scale the map depending on the selected region?
I display on the map points of issue throughout Russia. Made a filter by region.
How to make it so that when you click on a region, for example, St. Petersburg, the map focuses on the Leningrad region?
Here is the code:
myMap = new ymaps.Map('yandexMap', {
center: [55.76, 37.64],
zoom: 10
});
let objectManager = new ymaps.ObjectManager({
clusterize: true,
gridSize: 32,
clusterDisableClickZoom: true,
controls: [],
zoomMargin: [20]
});
objectManager.objects.options.set('preset', 'islands#greenDotIcon');
objectManager.clusters.options.set('preset', 'islands#greenClusterIcons');
myMap.geoObjects.add(objectManager);
objectManager.add(ObjectYandexJSON);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question