Available Filters to manipulate data

You are here:

The plugin has some filters that developers can use to manipulate the output of the maps.

igm_add_meta

Runs as soon as the plugin fetches the meta information for a given map.

Usage example:

add_filter( 'igm_add_meta', 'igm_custom_meta', 1 );
function igm_custom_meta( $meta ){
//do whatever you want with $meta
return $meta;
}

igm_prepare_meta

Similar to the previous filter, but runs a bit after.

add_filter( 'igm_prepare_meta', 'igm_custom_meta', 1 );
function igm_custom_meta( $meta ){
//do whatever you want with $meta
return $meta;
}

More information and examples soon.

igm_map_before

igm_map_after

igm_mapbox_classes

Custom Post Type Example

In the example below we are populating the map using data from a custom post type.

Other Examples

Here are a few examples of custom addons developed using the filters above. Most of these will also add extra fields/options to the maps.

https://github.com/carmoreira/igm-products-integration

https://github.com/carmoreira/igm-charities-integration

Posted by Carlos Moreira

Lead developer of Interactive Geo Maps plugin.