Instantly share code, notes, and snippets.

Embed
What would you like to do?
//Draw a single marker
protected override void OnBeforeClusterItemRendered(Java.Lang.Object p0, MarkerOptions markerOptions)
{
ClusterItem clusterItem = (ClusterItem)p0;
//Icon for single marker
if (clusterItem.m_bIsFav)
markerOptions.SetIcon(BitmapDescriptorFactory.FromResource(Resource.Drawable.marker_fav));
else
markerOptions.SetIcon(BitmapDescriptorFactory.FromResource(Resource.Drawable.marker));
//...
}
//Draw a grouped marker
protected override void OnBeforeClusterRendered(ICluster p0, MarkerOptions markerOptions)
{
bool bIsFav = false;
foreach (ClusterItem itm in p0.Items)
{
bIsFav = itm.m_bIsFav;
break;
}
if (bIsFav)
m_imageviewForMarkerGroup.SetImageResource(Resource.Drawable.marker_cluster_grouped_fav);
else
m_imageviewForMarkerGroup.SetImageResource(Resource.Drawable.marker_cluster_grouped);
//...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment