Created
April 14, 2021 20:33
-
-
Save carmoreira/84dc731bee908a7c988c39f4a87b01d2 to your computer and use it in GitHub Desktop.
Interactive Geo Maps - Intercept regions click to run custom code
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
let mapID = 2755; | |
iMaps.maps[mapID].series[0].mapPolygons.each(function(region){ | |
region.events.on("hit", function(ev) { | |
let data = ev.target.dataItem.dataContext; | |
let region = data.id; | |
// do whatever you want here | |
}, this); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment