Skip Navigation

[Gelöst] How do I set clusterClick?

This support ticket is created vor 5 Monate. 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 3 Antworten, has 2 Stimmen.

Last updated by chrisH-10 vor 4 Monate, 4 Wochen.

Assigned support staff: Waqar.


Tell us what you are trying to do?
I have a map with custom clusters. I would like to add a listener for the clusters so I can show a list of results below the map based on the markers it resolves to.

Is there any documentation that you are following? .
That works fine for the custom styles and renderer. By the Google documentation I should also be able to set onClusterClick along with the other options by you don't seem to expose or apply this. I also did not find a way to access the ClusterRenderer instance to use addListener('clusterClick"...)

What is the link to your site?
hidden link
User: flywheel
Pass: chivalrous-victory



Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)


Thank you for contacting us and I'd be happy to assist.

I did some research and couldn't find any event listener specific to Toolset Maps, for this.

Can you test the approach suggested in this forum thread:



I had set this to resolved along with the solution. Unfortunately it appears to have been lost. I had a longer writeup but the basic solution is pretty easy:

jQuery( document ).on( 'js_event_wpv_addon_maps_init_map_completed', function( event, data ) {
      let clusterer = WPViews.view_addon_maps_clusters['map-homes'];
      clusterer.addListener("clusterclick", (e) => {`This cluster contains ${e.markers_.length} items.`);

My "Final reply" was not posted previously. Let's see if this one posts...