Created
February 3, 2022 09:35
-
-
Save carmoreira/d01741175db3ea677c1498509a79c83e to your computer and use it in GitHub Desktop.
Reset map on load to fix zoom/center issues
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 = 237; | |
let mapContainer = document.getElementById('map_' + mapID); | |
mapContainer.addEventListener('mapready', function(ev) { | |
iMaps.maps[mapID].map.goHome(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment