Skip to content

Instantly share code, notes, and snippets.

@cyberhobo
Last active December 12, 2015 00:59
Show Gist options
  • Save cyberhobo/4688066 to your computer and use it in GitHub Desktop.
Save cyberhobo/4688066 to your computer and use it in GitHub Desktop.
Geo Mashup google v3 custom marker z-index for a marker with an object with category ID 9
(function( $ ) {
GeoMashup.addAction( 'loadedMap', function( properties, mxn_map ) {
$.each( mxn_map.markers, function( i, marker ) {
var objects = GeoMashup.getMarkerObjects( marker );
$.each( objects, function( j, object ) {
$.each( object.categories, function( k, category_id ) {
if ( 9 == category_id ) {
marker.proprietary_marker.setZIndex( 100 );
}
});
});
});
});
}(jQuery));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment