-
-
Save espritm/2f9d16bf4e82f6833282b155fec4d561 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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