Cluster markers in Google Maps Android v2

后端 未结 8 1718
你的背包
你的背包 2020-12-23 15:01

I have to place different markers on a GoogleMap from the Google Maps Android v2 API. The problem is that multiple markers are set to the same position (lat/lng), so the use

8条回答
  •  [愿得一人]
    2020-12-23 15:48

    if you are getting only the newest marker then you need to cluster all the markers

    > private ClusterManager mClusterManager;
    

    after affffding your items

    mClusterManager.addItem("your item");
    mClusterManager.cluster();
    

提交回复
热议问题