-
-
Save carmoreira/3482968239db91a9b9ba6263ac5b5cd0 to your computer and use it in GitHub Desktop.
Interactive Geo Maps - reset to base series when marker is hovered out
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
// set map ID | |
let mapID = 22020; | |
let mapContainer = document.getElementById('map_' + mapID); | |
mapContainer.addEventListener('mapready', function(ev) { | |
let allMarkers = iMapsManager.getMarkersByValue(mapID, '*', 'id'); | |
allMarkers.forEach(function(marker) { | |
marker.events.on("out", function(ev) { | |
iMaps.maps[mapID].series.forEach(function(serie){serie.hide();}); | |
iMaps.maps[mapID].allBaseSeries.forEach(function(serie){serie.show();}); | |
}, this); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment