Skip to content

Instantly share code, notes, and snippets.

@andtrev
Created April 26, 2019 21:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andtrev/ae78e7bc85c3a77a64f5d195636222f4 to your computer and use it in GitHub Desktop.
Save andtrev/ae78e7bc85c3a77a64f5d195636222f4 to your computer and use it in GitHub Desktop.
jQuery(function($){
$('.wpgmza_map').on('wpgooglemaps_loaded', function(){
var mid = parseInt($(this).attr('data-map-id'));
MYMAP[mid].map.on('markersplaced', function(event){
$.each(wpgmaps_localize_marker_data[mid], function(i, v){
MYMAP[mid].map.getMarkerByID(parseInt(v.marker_id)).googleMarker.setOptions({optimized: false});
MYMAP[mid].map.getMarkerByID(parseInt(v.marker_id)).googleMarker.setZIndex(1000+parseInt(v.marker_id));
});
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment