Skip Navigation

[Gelöst] Hover over link in search results list to cause hover state on map markers

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem: I would like to focus on a Map Marker when I click a link in my search results, and I would like to trigger the hover state of a Map Marker when I hover over a link in my search results.

Solution: Use the Interactions panel on the "Focus on Marker" button pop-up dialog to turn on these features.

This support ticket is created vor 6 Jahre. There's a good chance that you are reading advice that it now obsolete.

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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 Antworten, has 2 Stimmen.

Last updated by daveG-7 vor 6 Jahre.

Assisted by: Christian Cox.

Author
Artikel
#635479

Hello. I have a map that displays the results in my custom search: hidden link

Following advice from another forum topic here, I created links in the list that, when clicked, will focus on the map markers associated with that post and open its infowindow. I used the following for the links:

<a href="javascript:void(0);" class="js-wpv-addon-maps-focus-map js-toolset-maps-open-infowindow-map-map-5-marker-marker-[wpv-post-id]" data-map="map-5" data-marker="marker-[wpv-post-id]">LINK</a> 

This is currently only set up to work with one marker type. The first result returned, Property ID 542 that says "For Sale" and has a picture of a greenhouse works to test this.

This link is currently wrapped around the images that are shown in the results list. This works well. However, what I would also like is if the user hovered their mouse over the link (the image), the map marker associated with that link would also enter its hover state (show the marker image that is also shown when the user hovers over the marker). This would indicate what clicking on the link that opens the marker would do, and also gives a quick way for people to see where a result is located.

Thanks.

#636731
Screen Shot 2018-04-08 at 10.19.31 AM.png

Hi, In the popup dialog to insert a "Focus on map" button you can find an option to respond to click and hover events in the Interactions panel. See the attached screenshot. Hovering over the link will trigger the hover state of the associated marker.

#636899

That's perfect, thanks. I had no idea that option (adding a focus on map button) could be used this way - it's quite powerful if you use [wpv-post-id] to call the particular marker, but not obvious that you can - maybe a way to improve it would be to give a dropdown under "ID of the marker to zoom in" that allowed that as an option.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.