Skip to content

Instantly share code, notes, and snippets.

Last active September 28, 2021 09:26
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
select region by default, when map loads - interactive geo maps
// replace with your map ID and region code.
let mapUID = 236195;
let regionCode = 'US-CA';
let mapContainer = document.getElementById('map_' + mapUID);
mapContainer.addEventListener('mapready', function(ev) {
let urlParams = new URLSearchParams(;
let myParam = urlParams.get('mregion');
setTimeout(function(){, regionCode) },500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment