O
O
ortsuev332018-10-02 12:15:39
Yandex maps
ortsuev33, 2018-10-02 12:15:39

Is it possible to limit labels by city in yandex map?

Is it possible to limit labels by city in yandex map?
I have a list of cities in the input field, the user clicks on a city from the list and a map with a marker in the city center is displayed, is it possible to make the user not be able to place a marker outside the selected city?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2018-10-02
@ortsuev33

Either you draw a polygon for each city and check if the marker is in it or not. Either through geocoding, you determine whether they poked into the city or not. If the user has to drag the marker, then with a geocoder you will quickly run out of limits.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question