1

I am using three Cluster Managers in my application.

    // Rent markers
    rentClusterManager = new ClusterManager<OffersMarker>(this, gmap);
    rentClusterRenderer = new OffersClusterRenderer(this, gmap, rentClusterManager);
    rentClusterManager.setRenderer(rentClusterRenderer);

    // Sale markers
    saleClusterManager = new ClusterManager<OffersMarker>(this, gmap);
    saleClusterRenderer = new SaleOffersClusterRenderer(this, gmap, saleClusterManager);
    saleClusterManager.setRenderer(saleClusterRenderer);

    // Campaign markers
    campaignClusterManager = new ClusterManager<OffersMarker>(this, gmap);
    campaignAdMarkersClusterRenderer = new CampaignOffersClusterRenderer(this, gmap, campaignClusterManager);
    campaignClusterManager.setRenderer(campaignAdMarkersClusterRenderer);

Is there a way to draw one specific (campaign) cluster and its corresponding markers on top of other?

I tries to do ClusterManager.cluster() to redraw all the markers but it didn't work at all.

I know you can add a z-index to a marker when adding it on the map. I have a solutions where I am not using a cluster for the the campaign markers that works but I am wondering if there is an option to have this z-indexing done on the Cluster level?

Thanks!

KasparTr
  • 2,328
  • 5
  • 26
  • 55
  • See http://stackoverflow.com/questions/17672133/changing-z-index-z-order-of-map-marker-for-maps-v2-in-android – Denny Weinberg Sep 26 '16 at 14:48
  • I read that answer. The thing is I am not adding the markers in a way where I can set their z-index. I am doing ClusterManager.addItem(ClusterItem); – KasparTr Sep 26 '16 at 15:14
  • And the other answer? "map.addMarker(new MarkerOptions() .position(new LatLng(10, 10)) .title("Marker z1") .zIndex(1.0f));" – Denny Weinberg Sep 27 '16 at 09:08
  • With clusters I never go through the process of map.addMarker(...). You instead add ClusterItems to clusters and the rest is done by the library. Thats how I have understood it. If I am wrong please let me know. – KasparTr Sep 27 '16 at 10:28
  • Ah yes, you are right. Sorry. – Denny Weinberg Sep 27 '16 at 17:51

0 Answers0