Streaming live at 10am (PST)

Set Max Zoom Level with Google Maps

#1

Hi All,

Would anyone know if there is a bit of code that limits the zoom out level on google maps. I’m using snazzymaps and the user can zoom out to show multiple maps in a strip.

Thanks,

Niall

#2

Any suggestions welcome

#3

It’s been added to the api, you can just set that option directly on the map object:

  map.setOptions({ minZoom: 5, maxZoom: 15 });

ref - https://developers.google.com/maps/documentation/javascript/reference#MapOptions

My reference: https://stackoverflow.com/questions/21912831/google-map-zoom-out-limit

#4

Thanks for the response. I came across this bit of code but didn’t know where to put it.

Can it be added in Webflow? I have used Snazzymaps which uses the Google Maps API

#5

I do believe that this is somekind of JavaScript setting? You probably just need to paste that inside script tag in the Head of your webpage, and it might work. I’m not so used to this kind of element. I’m sorry for not being able to help you more

#6

Thanks. I tried that but no luck. No probs.

1 Like