Skip Navigation

[Resolved] Add marker not subject to cluster

This support ticket is created 3 years, 8 months ago. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 3 years, 8 months ago.

Assisted by: Minesh.

Author
Posts
#2063923

to add a map marker and exclude it from being part of a cluster
https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-marker
sample code that is claimed to allow some markers to be clustered and others not

The markers you want to cluster, you can add them to the ClusterManager. clusterManager.addItem(yourItem);

The ones you don't want to cluster, you can add them directly to your GoogleMap object. map.addMarker

Inside your MarkerRenderer you can override
protected void onClusterItemRendered(YourClusterItem clusterItem, Marker marker)
and map yourClusterItem to your Marker if needed. Or you can set a tag to your marker indicating it's a clusterItem.
In public boolean onMarkerClick(Marker marker) you can check your tag (or your map) to have a different behaviour for each kind of marker.
Can you advise how this might be achieved?
Thanks

#2064017

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Toolset Maps offer the marker cluster feature where once you activate the "Cluster Marker" setting it will ask you for few options as per the following screenshots and once you set that the cluster marker group will work according to the specified settings:
=> hidden link

Here is the doc how you can display map using Toolset: https://toolset.com/course-lesson/displaying-a-simple-map/

Please let me know if you need further assistance.