Answer the question
In order to leave comments, you need to log in
How to limit the viewing area of Yandex maps?
Good afternoon. Maybe someone came across, tell me how to limit the map view area in Yandex.Maps API 2.0, for example, by any city?
Answer the question
In order to leave comments, you need to log in
it is relatively difficult to do it right.
when something wants to move the map somewhere, an actiontick event occurs on map.events,
you can pull out event.get('action') from it and tweak it a bit.
it has globalPixelCenter and zoom fields, and if you make sure that these values do not go beyond certain limits, you can get some coffee.
Keeping track of boundschange and other events is not entirely correct as it will allow the user to fly a wide hard kinetic dredge anywhere they want.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question