View drilldownzoom.js
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 igmNow = Date.now(); | |
let igmZoomLevel = 3; | |
mapContainer.addEventListener('mapready', function(ev) { | |
let igmap = iMaps.maps[mapID].map; | |
igmap.events.on("zoomlevelchanged", function(ev) { | |
if( Date.now() >= igmNow + 500){ | |
let series = iMaps.maps[mapID].series; | |
series.forEach(function(serie) { | |
if( iMaps.maps[mapID].allBaseSeries.includes( serie ) ){ return; } | |
if (igmap.zoomLevel >= igmZoomLevel) { |
View specificMap.js
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 and region code. | |
let mapID=3492193; | |
let mapContainer=document.getElementById('map_' + mapID); | |
mapContainer.addEventListener('mapready', function(ev) { | |
iMaps.maps[mapID].series[0].mapPolygons.each(function(region) { | |
region.events.on("hit", function(ev) { | |
let data=ev.target.dataItem.dataContext; | |
let drillTo=parseInt(data.value); | |
if (Array.isArray(iMapsManager.maps[mapID].seriesById[drillTo])) { |
View WorldUSA.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View style.css
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
.map_wrapper .choices__list--dropdown .choices__list { | |
max-height:200px !important; | |
} |
View canarias.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View australia.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View kenya.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View animate.css
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
/* For color #dd3333 */ | |
.imapsCircle-group[fill="#dd3333"] .imapsCircle { | |
paint-order: stroke; | |
stroke: #dd3333; | |
stroke-opacity:0; | |
stroke-width:15px; | |
transition: stroke-opacity 0.5s, stroke-width 0.2s; | |
} | |
/* For color #2ca25f */ |
View show.js
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
// added this control check, in case code was added more than once | |
if (typeof mapCode === 'undefined') { | |
let mapID = 159; // CHANGE MAP ID HERE | |
let mapContainer = document.getElementById('map_' + mapID); | |
mapContainer.addEventListener('mapready', function(ev) { | |
iMaps.maps[mapID].series.forEach(function(serie) { | |
if (serie.className === 'MapImageSeries') { | |
serie.show(); | |
} | |
}); |
View reset.js
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
jQuery('.igm-map-content').each(function() { | |
var button = jQuery('<a>Close</a>'); | |
button.on('click', function() { | |
var mapID = 3492169; // replace with your map ID | |
iMapsManager.clearSelected(mapID); | |
iMapsActions.resetActions(mapID); | |
}); | |
jQuery(this).prepend(button); | |
}); |