twotoasters / clusterkraf

A clustering library for the Google Maps Android API v2
Apache License 2.0
255 stars 57 forks source link

#15 Support showing ClusteredPoint at centroid of all contained points instead of at initial point. #16

Open ruckc opened 11 years ago

ruckc commented 11 years ago

The only issue with this implementation is when splitting a clusteredPoint (size 3) into two clusteredPoints, the 'size 2' point jumps (non-animated). This seems to happen when any clusteredPoint splits off a clusteredPoint (size 1).

carltonwhitehead commented 11 years ago

I considered taking this approach early in development, but I decided not to implement it because it results in drawing markers where no points actually exist. I can understand that is mostly a matter a preference though, so I would be willing to accept this pull request if you add an option to enable/disable this behavior in the Options class.

EDIT: and please comment the setting as a beta feature until the animation issue can be resolved.

carltonwhitehead commented 11 years ago

@ruckc sorry I didn't get back to you earlier about this. I like where you are going with this, but I'm concerned about the static ClusterPoint reference to Options. Also, (this is my fault), its constructors are getting unwieldy, so I don't want to ask you to refactor that. At some point, I'm going to refactor the ClusterPoint class, most likely using a Builder pattern, and I will merge your pull into that. I'll keep all of the public APIs the same though, so it shouldn't cause any conflicts with your branch when we eventually merge. Thanks for your contribution!