Skip to content

Instantly share code, notes, and snippets.

@espritm
Last active April 24, 2017 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save espritm/5d059f018b2ae0243892bfa1edfa445e to your computer and use it in GitHub Desktop.
Save espritm/5d059f018b2ae0243892bfa1edfa445e to your computer and use it in GitHub Desktop.
public class MainActivity : AppCompatActivity, IOnMapReadyCallback, ClusterManager.IOnClusterItemInfoWindowClickListener
{
public Dictionary<string, ClusterItem> m_dicAllMarkerOnMap = new Dictionary<string, ClusterItem>();
//...
public void OnMapReady(GoogleMap map)
{
//...
//Initialize cluster renderer, and keep a reference that will be usefull for the info window's click event
m_ClusterRenderer = new ClusterRenderer(this, m_map, m_ClusterManager, m_dicAllMarkerOnMap);
//Custom info window : single markers only (a click on a cluster marker should not show info window)
m_ClusterManager.MarkerCollection.SetOnInfoWindowAdapter(new CustomGoogleMapInfoWindow(this, m_dicAllMarkerOnMap));
//...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment