is it possible to limit Google map v3 to a certain area? I want to allow displaying only some area (e.g. a country) and disallow the user to slide elsewhere. Also I want to restrict the zoom level – e.g. only between levels 6 and 9. And I want to use all the base map types.
Is there any way to achieve this?
I had a partial success with limiting zoom level by using StyledMap, but I succeeded only with restricting ROADMAP, I wasn't able to limit zoom on other basic types this way.
Thanks for any help
Best Answer
Better way to restrict zoom level might be to use the
minZoom
/maxZoom
options rather than reacting to events?Or the options can be specified during map initialization, e.g.:
See: Google Maps JavaScript API V3 Reference