Problem: I would like to be able to access marker information using JavaScript.
Solution: You can access all the Marker objects in JavaScript here:
WPViews.view_addon_maps.markers
They are organized by map ID and marker ID.
You can also add event listeners that respond to marker clicks. See the example "Using Closures in Event Listeners" in the documentation below. If you add a click handler to the Markers, then inside the callback you can access the marker ID. You could use that ID to show and hide other content on the page. For example if the marker ID is 'marker123', then you could add a CSS class "marker123" to some div in the second View. When the marker is clicked, hide all the other content in the second View, and show div.marker123
Relevant Documentation:
https://developers.google.com/maps/documentation/javascript/events
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 2 replies, has 2 voices.
Last updated by 5 years, 8 months ago.
Assisted by: Christian Cox.