We don’t want to see the map repeating itself in the viewport if possible. We want people to only be able to zoom out so far and then it stops.
Right now people can zoom out so far that the map is repeated about 6 or 7 times. This is silly.

Is there a way to prevent zooming out past a certain number? It’s ok if there is a tiny bit of repeat, that might be based on width of their viewport etc. But it’s also ok if the zoom stops and it forces them to pan around to find something. I just don’t want to zoom out to see the world repeat 6 times.

Can this be done?

Public
I know this can be changed, it's supported in the Google API.

All that's needed is to add the 'minZoom' and 'maxZoom' options to the map generation script so it looks like this:

map_obj.map = new google.maps.Map(map_obj.element, {
zoom: parseInt(map_obj.settings.zoom),
maxZoom: 20,
minZoom: 2,
center: center,

……other options.......

}


This is in the maps.js file.

You already have the default zoom as an option, but it would be very good to add minZoom and maxZoom as options too.
#1
Public
You have to limit pan for limitation of zoom. Please follow this tutorial https://wpgmp.flippercode.com/docs/how-to-use-limit-panning-settings/ and your issue will be resolved.

Thanks
#2

Please login or Register to Submit Answer