twotoasters / clusterkraf

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

OnCameraChangeListener available outside the library #22

Open Mephistofeles opened 11 years ago

Mephistofeles commented 11 years ago

I need to set OnCameraChangeListener on map, which is currently impossible without changing the library internals. You should make it available to set a custom listener in Options.

carltonwhitehead commented 11 years ago

I like this idea. Feel free to implement this on a branch and submit a pull request. I'm scheduled to work on another project for a while, otherwise I would go ahead and do it. It should be fairly simple to add an OnCameraChangeListener to the Options object, and add a call back to it from Clusterkraf's internal OnCameraChangeListener

preslavrachev commented 11 years ago

I am also in a need to have my own onCameraChange listener. I think, it is a limitation of the Maps library itself, to not allow for multiple event listeners.

@carltonwhitehead: please, let me know when you add this to the Master. For the time being, I'd probably extend the MapFragment, proxyfying its Map object, to allow for multiple event listeners.

nealsanche commented 11 years ago

I ran into this limitation as well, yesterday, so I will have a look at adding this listener as described @carltonwhitehead.