Skip to content

Instantly share code, notes, and snippets.

@djrmom
Created March 20, 2019 19:52
Show Gist options
  • Save djrmom/4760abe263c3819385250351abc8fc42 to your computer and use it in GitHub Desktop.
Save djrmom/4760abe263c3819385250351abc8fc42 to your computer and use it in GitHub Desktop.
facetwp trigger open of marker on map
(function($) {
$(document).on('click', '.post-item', function() {
var postid = $(this).attr('data-id');
var markers = FWP_MAP.get_post_markers(postid);
$.each( markers, function( key, value ) {
google.maps.event.trigger(value, 'click');
});
});
})(jQuery);
@aaronhb
Copy link

aaronhb commented Mar 17, 2021

How would we make it zoom in on clustered markers and zoom out on non clustered markers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment