Skip to content

Instantly share code, notes, and snippets.


espritm/ClusterRenderer.cs Secret

Last active Apr 11, 2017
What would you like to do?
public class ClusterRenderer : DefaultClusterRenderer
public Dictionary<string, ClusterItem> m_dicAllMarkerOnMap;
public ClusterRenderer(Activity context, GoogleMap map, ClusterManager clusterManager, Dictionary<string, ClusterItem> dicAllMarkerOnMap)
: base(context, map, clusterManager)
m_dicAllMarkerOnMap = dicAllMarkerOnMap;
//After a cluster item have been rendered to a marker
protected override void OnClusterItemRendered(Object item, Marker marker)
base.OnClusterItemRendered(item, marker);
ClusterItem clusterItem = (ClusterItem)item;
if (!m_dicAllMarkerOnMap.ContainsKey(marker.Id))
m_dicAllMarkerOnMap.Add(marker.Id, clusterItem);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment