Which markers are grouped in the cluster.

Hi Support-Team,
a cluster marker shows the number of combined markers.
Is there a way to list the individual markers of this cluster marker? (OnClusterClick)



You can programmatically iterate the Markers collection and check for each Marker if it's Cluster property is assigned to the Cluster that was clicked.

Thanks, I knew that. However, the list always provides all the markers in the cluster. But I'm only looking for the markers of the clicked group.

Thank you for the clarification.
Unfortunately this is currently not supported.
However this is a good suggestion and we'll investigate if this feature can be added in the future.

I found a workaround.
In VCL.TMSFNCGoogleMaps.pas I've added the identifier "Elements" in the click-listener. (also in mouseover and mouseout)
So I can parse for "Elemsts" as X in AEventData.CustomData at TMSFNCGoogleMaps1ClusterClick
Now I'm looking for the X nearby markers in then Cluster.

'    google.maps.event.addListener(' + CLUSTERVAR + ', "click", function(c) {' + LB +
'      var pt = c.getCenter()' + LB +
**'      var el = c.getSize()' + LB +**
'      var lat = parseFloat(pt.lat());' + LB +
'      var lng = parseFloat(pt.lng());' + LB +
'      var jsonObj = getDefaultCoordinateObject();' + LB +
'      jsonObj["Latitude"] = lat;' + LB +
'      jsonObj["Longitude"] = lng;' + LB +
**'      jsonObj["Elements"] = el;' + LB +**
'      ' + GETSENDEVENT + '(parseEvent(event, "ClusterClick", ' + PARAMSNAME + '[0]["ID"]), jsonObj);' + LB +
'    })' + LB +

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.