Skip to content

Instantly share code, notes, and snippets.

carmoreira / click.js
Created Apr 14, 2021
Interactive Geo Maps - Intercept regions click to run custom code
View click.js
let mapID = 2755;
iMaps.maps[mapID].series[0].mapPolygons.each(function(region){"hit", function(ev) {
let data =;
let region =;
// do whatever you want here
}, this);
carmoreira / style.css
Created Mar 16, 2021
Styling Zoom Controls Interactive Geo Maps
View style.css
/* Consider they are SVG shapes, so rules are limited */
/*home button*/
.imapsZoomControl path.imapsSprite {
fill:#FFF !important;
/* buttons background*/
.imapsZoomControl path {
fill:#6699cc !important;
carmoreira / guadeloupe.geojson
Created Mar 6, 2021
Guadeloupe communes geojson
View guadeloupe.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
carmoreira / script.js
Created Mar 5, 2021
Create Button to clear content that displays after map is clicked - Interactive Geo Maps
View script.js
// this assumes there's at least one element on the page with the class clear_map_info
function(button) {
button.addEventListener('click', function(event) {
// If the clicked element doesn't have the right selector, bail
if (!'.clear_map_info')) return;
// Don't follow the link
carmoreira / click.js
Created Feb 23, 2021
trigger click on full li container - advisor quiz
View click.js
carmoreira / style.css
Created Feb 19, 2021
Interactive Geo Maps Scroll on Right Content Container
View style.css
.igm_content_right_1_3 {
border-bottom: 1px solid #f1f1f1;
.igm_content_right_1_3::-webkit-scrollbar {
-webkit-appearance: none;
width: 7px;
carmoreira / style.css
Created Feb 15, 2021
Target clicked image marker on Interactive Geo Maps
View style.css
/* or only outline: none; */
g.imapsMapImage-group[style="cursor: pointer; outline: none;"] image {
outline: 1px solid red;
carmoreira / gist:91222771e4eddd2336e4b38d70307a75
Created Feb 11, 2021
Get external JSON and populate map with it in PHP - Interactive Geo Maps
View gist:91222771e4eddd2336e4b38d70307a75
add_filter( 'igm_add_meta', 'igm_custom_meta', 1 );
function igm_custom_meta( $meta ){
//fetch content from url - if possible improve code to cache results
$url = 'https://myjsonurl';
$request = wp_remote_get( $url );
if ( ! is_wp_error( $request ) ) {
$meta['iconMarkers'] = $request['body'];
carmoreira / data.json
Created Feb 11, 2021
Example of Data from Interactive Geo Maps - With Vector Icons
View data.json
View gist:94838bf43cc99ce6a0f6c758d521f22e
jQuery(".advq_quiz_wrap").on("advqPadvisorDoneEvent", function() {
//your tracking code.