minZoom
and maxZoom
options when you create the map object. These properties allow you to define the minimum and maximum zoom levels that the user can zoom in and out to. minZoom
and maxZoom
to 10 to restrict the map to a city level view.initMap
function to include these options:function initMap()
{
DBTech.MemberMap.config.map = new google.maps.Map(document.getElementById('dbtech_membermap_map'), {
center: {lat: DBTech.MemberMap.config.lat, lng: DBTech.MemberMap.config.long},
zoom: 10,
minZoom: 10,
maxZoom: 10
});
DBTech.MemberMap.initMap();
}
google.maps.Map
to the DBTech.MemberMap.config.map
property. This map object is centered at the latitude and longitude specified in DBTech.MemberMap.config.lat
and DBTech.MemberMap.config.long
, with a zoom level set to 10. The minZoom
and maxZoom
options are also set to 10, effectively restricting the map to a city level view.We use essential cookies to make this site work, and optional cookies to enhance your experience.