Created
January 12, 2022 09:26
-
-
Save carmoreira/ba3e357c26e8e8e2360f0c1608033da0 to your computer and use it in GitHub Desktop.
Lock minimum zoom level for a map - Interactive Geo Maps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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