Skip to content

Instantly share code, notes, and snippets.

@carmoreira
Created January 12, 2022 09:26
Show Gist options
  • Save carmoreira/ba3e357c26e8e8e2360f0c1608033da0 to your computer and use it in GitHub Desktop.
Save carmoreira/ba3e357c26e8e8e2360f0c1608033da0 to your computer and use it in GitHub Desktop.
Lock minimum zoom level for a map - Interactive Geo Maps
// replace with your map ID
let mapID = 236162;
let mapContainer = document.getElementById('map_' + mapID);
mapContainer.addEventListener('mapready', function(ev) {
iMaps.maps[mapID].map.minZoomLevel = iMaps.maps[mapID].map.zoomLevel;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment