Zoom Levels API Google Maps

Asked

Viewed 686 times

1

Can anyone tell if they can set the maximum zoom level and the minimum level in the Google Maps API?

When you zoom in, the hemispheres repeat and I don’t want the user to see this.

Ex of repeated points: https://www.google.com/maps/@32.7903114,79.5768393,2z

I want to avoid exactly this, the duplicity of locations, and what I initially thought was, limit the user’s zoom. Set the min zoom.

1 answer

1


For those who are interested,

In the Google Maps documentation, there is a property called Minzoon. Just set the minimum value.

Example:

    mapOptions = {
                            zoom: zoom,
                            center: new google.maps.LatLng(30.8097, -98.5553),
                            mapTypeId: google.maps.MapTypeId.ROADMAP,
                            mapTypeControl: false,
                            panControl: false,
                            disableDefaultUI: true,
                            navigationControl: false,
                            streetViewControl: false,
                            scrollwheel: false,
                            zoomControl: true,
                            minZoom: 2
 };

Browser other questions tagged

You are not signed in. Login or sign up in order to post.