Answer the question
In order to leave comments, you need to log in
How can I prevent the map from being dragged outside of it?
Tell me what options you need to specify in the map settings so that the user cannot get out of the map area. I put a zoom limit on the map minZoom: 2
, but anyway, if you start dragging the map, you crawl out of its limits into a gray area without data.
Answer the question
In order to leave comments, you need to log in
Something like this
myMap.behaviors.disable('scrollZoom');
myMap.behaviors.disable('drag');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question