Answer the question
In order to leave comments, you need to log in
How to make a drop-down list of cities on Yandex maps?
Good day!
You need to make sure that there is a drop-down list of cities. When choosing a city from the list, you need to center the map on this city. There should also be an item "All cities", and the map is centered on the specified coordinates simply.
I found this option https://jsfiddle.net/gmsxeLb9/27/
But, since I'm almost zero in JS, I don't understand where to insert the coordinates.
I put in .geometry.getCoordinates() , but it doesn't center when city is selected. Even if I insert the required value into geoObjects.get(0)
And yes, the dropdown list must be implemented via select
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