Skip to content

Instantly share code, notes, and snippets.

@carmoreira
Created April 22, 2020 14:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carmoreira/7730ea813f73339a9a5de363f19dcff9 to your computer and use it in GitHub Desktop.
Save carmoreira/7730ea813f73339a9a5de363f19dcff9 to your computer and use it in GitHub Desktop.
Set map selection based on URL hash - Interactive Geo Maps.
// replace with your map ID.
let mapID = 21148;
let mapContainer = document.getElementById('map_' + mapID);
mapContainer.addEventListener('mapready',function(ev){
let hash = window.location.hash.substr(1);
if(hash){
iMapsManager.select(mapID,hash);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment