yuvaraj119 / android-maps-extensions

android-maps-extensions
0 stars 0 forks source link

Multiple Clusters by Marker icon #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi

I wonder if there could be any options to cluster by marker type.
I mean, now I've got four diferent marker icons, and I want to cluster only 
between them.

Thank you for this wonderful library :-)

Original issue reported on code.google.com by tortipat...@gmail.com on 13 Jun 2013 at 3:36

GoogleCodeExporter commented 9 years ago
Hello,

This feature is already planned as a resolution for Issue 10.

Basically what I think about is assigning group id for every marker and only 
markers with the same group will be clustered together.

Feel free to comment on the original issue if you want to influence the API 
calls required to achieve this.

Thinking of a workaround for now...
You could modify pl.mg6.android.maps.extensions.SupportMapFragment to always 
return a new instance of GoogleMap. Then you can have 4 such instances, which 
have their own clustering settings and separate markers.
The problem is only the last one will be able to receive callbacks from the API 
like onMarkerClick and onInfoWindowClick and you will have null as parameter 
for markers that are not in the group of that GoogleMap.

Original comment by maciek.g...@gmail.com on 13 Jun 2013 at 5:52

GoogleCodeExporter commented 9 years ago
Hi!

Thank you! I'm sorry, I didn't realize it was in 10 too :-S

I'll try that way :-D

Original comment by tortipat...@gmail.com on 13 Jun 2013 at 5:59

GoogleCodeExporter commented 9 years ago
If you do try it, please comment on if it works how I described it here. I 
haven't tried it myself.

Issue 10 wasn't originally a request for separate marker groups, but I thought 
it would make sense to extend it this way. A marker that is not clustered with 
others is obviously a group with single marker.

Original comment by maciek.g...@gmail.com on 13 Jun 2013 at 6:12