Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible, in the Google Maps API v3, to restrict the zoom to specific levels (eg 16 and 7)?

In my case I wish to show city points at a global scale, then show suburb polygons when zoomed in - but I only want those 2 levels of zoom rather than the full 20 levels.


share|improve this question
@mapperz thanks – Stephen Lead Nov 18 '11 at 21:55
up vote 4 down vote accepted

Yes, but not directly. If you needed a range, you could use map.setOptions() and set the min/maxZoom. As you aren't looking for a range, I suggest listening for zoom events on the map, and restricting the zoom levels in the event handlers. I've done it with other APIs before, and its worked fine. There's an example on StackOverflow about doing something similar: Limit Viewable Area in GMaps v3 Oh, and you'll probably want to disable the zoom control to minimize/avoid user confusion.

share|improve this answer
thanks for that - looks like a good workaround – Stephen Lead Nov 18 '11 at 21:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.