Skip to content

Instantly share code, notes, and snippets.

Last active April 11, 2017 16:16
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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