Access map and markers by JavaScript
-
Hi there,
I’m implementing WP Store Locator a bit custom. I’ve gotten away for the most part using the available filters and hooks, but I’ve recently run into a couple issues that have required me to make edits to the wpsl-gmap.js file.
One is trying to implement hover states on the markers using mouseover and mouseout. That could be solved if I were able to access the
markersArray
array outside of the plugin’s JS file.The other is a map zoom issue due to hiding the map in a window that has
display: none;
. I was able to fix this by calling thefitBounds()
function on clicking the button that shows the map. If I were able to access that outside the plugin’s JS as well I could get by without making an plugin edits.Any chance you could make those available globally? Or if you have the plugin on github I can take a crack at opening a PR for you to review. Or just let me know if I completely missed how to do this in the plugin already.
Thanks!
- The topic ‘Access map and markers by JavaScript’ is closed to new replies.