Created
March 20, 2019 19:52
-
-
Save djrmom/4760abe263c3819385250351abc8fc42 to your computer and use it in GitHub Desktop.
facetwp trigger open of marker on map
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How would we make it zoom in on clustered markers and zoom out on non clustered markers?