ADClusterMapView icon indicating copy to clipboard operation
ADClusterMapView copied to clipboard

Adding and removing pins dynamically

Open k06a opened this issue 12 years ago • 8 comments

I would like to fork your libarry and continue it development.

And I have some questions before begin: What shall I do to provide adding and removing pins dynamically? I think whole 2-d tree recreation is too dummy solution. Any advices?

k06a avatar Feb 01 '13 14:02 k06a

Hi k06a. Feel free to fork and contribute some code. Even better, submit a pull request here so we can mirror your improvements!

Anyway, you can read all about the algorithm here: http://applidium.com/en/news/too_many_pins_on_your_map/

Ecco avatar Feb 01 '13 16:02 Ecco

Hey k06a,

did u create a solution with more than one tree?

I try to find a library with the clustering functionality and the option to use different pins for different kind of annotations.

Any idea?

Cheers

eikebartels avatar Feb 07 '14 06:02 eikebartels

@Ecco & co - just wanted to verify something. I'm trying to add a pin to my map view after the initial set of annotations has been mapped out. I was able to do this with the version of code grabbed from the repo using a method called addNonClusteredAnnotation. I've since re-added ADClusterMapView as a Cocoapod (version 1.0.2) and that method is no longer present.

is there a way to add a pin to map after the initial mapping has been done?

hkellaway avatar Nov 13 '14 18:11 hkellaway

addNonClusteredAnnotation was introduced in 1.0.3 which wasn't published to CocoaPods until today. Sorry about that.

PatrickNLT avatar Nov 14 '14 08:11 PatrickNLT

Well in fact this doesn't close the issue. Reopening it.

PatrickNLT avatar Nov 14 '14 09:11 PatrickNLT

@PatrickNLT great news! I did just install ADClusterMapView Cocoapod 1.0.3 - and I'm afraid I don't see the addNonClusteredAnnotation method of something comparable, however.

hkellaway avatar Nov 14 '14 18:11 hkellaway

Sorry addNonClusteredAnnotation is part of 1.1.0 that I released today and pushed to CocoaPods.

Please note that there is a slight change of API, which is detailed in the CHANGELOG.

PatrickNLT avatar Nov 17 '14 09:11 PatrickNLT

@PatrickNLT perfect! works just as needed, thanks

hkellaway avatar Nov 17 '14 20:11 hkellaway