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 55677 with your map ID | |
document.addEventListener('input', function (event) { | |
if (event.target.id !== 'igm-live-filter-55677') return; | |
iMapsActions.resetActions(55677); | |
}); |
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
<?php | |
/** | |
* Interactive Geo Maps Custom Solution | |
* | |
* @wordpress-plugin | |
* Plugin Name: Interactive Geo Maps Custom Solution | |
* Plugin URI: https://interactivegeomaps.com | |
* Description: Reads from custom meta fields | |
* Version: 1.0.0 | |
* Author: Carlos Moreira |
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])) { |
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); | |
}); |
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(); | |
} | |
}); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
setTimeout(function () | |
{ | |
let mapAnimation; | |
let mapID = 21022; // CHANGE THIS WITH YOUR MAP ID | |
mapAnimation = iMaps.maps[mapID].map.animate( | |
{ | |
property: "deltaLongitude", | |
to: 100000 | |
}, 20000000); | |
iMaps.maps[mapID].map.seriesContainer.events.on("down", function () |
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; | |
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.