Can I limit the zoom Google map api to individual zoom ?
I mean can I have zoom 2 and 6 only and not 2-3-4-5-6
I saw that I have min zoom and max zoom but I don’t want that the zoom will be in range only in single .
Regards,
Yossi
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can only mimic this. The API doesn’t allow you to miss out zooms.
The
zoom_changedevent no longer tells you anything about the change. In Version 2, you could know the old zoom-level and the new level.Accordingly, you have to guess in Version 3.
If you are at zoom 2 and the user zooms in, the API will go to zoom 3. So you can intercept the
zoom_changedevent, test whether the map is now at level 3 and put it to level 6. You can do the same in the other direction: if the map should be at level 5 (from 6), make it 2.Note that this will not help if the user uses the zoom slider and moves directly from 2 to 5: the event handler will see the current zoom as 5, assume it’s moved only one step (from 6) and set it back to 2. It also won’t help if the slider is used to get to zoom 4. You need to decide what should happen in these circumstances. You may want to use a limited set of map controls which doesn’t have the slider.