- Fix warnings when building with CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF. Thanks Gareth Redman for the PR.
- Fix block declaration warnings and update project files to Xcode 9.2. Thanks @damarte for the PR.
- Fix crash due to usage of KVO #136
- Set minimum deployment target to iOS 7.0 and fix deprecation warnings.
- Fix implementation of
annotations
property. Thanks to tarbrain for the code.
- Make
annotations
property thread-safe. Thanks for alxon and nverinaud for reporting this problem.
- The completion handlers for
addAnnotations:withCompletionHandler:
andremoveAnnotations:withCompletionHandler:
are now guaranteed to be called on the main thread. Thanks to robertjpayne for the pull request
CCHMapClusterController
now builds with Xcode 6/iOS 8 (thanks to detouch for the pull request and rosskimes for letting me know about the problem)
- Excluded private header files from pod
- Updated documentation
- Bug fix for missing
CCHMapClusterController
instance in delegate methods (thanks to Palleas for the pull request) - Added recipe to describe how
MKMapView
handles taps on annotation views (thanks to thomasouk for the question)
CCHMapClusterController
now has a new propertymaxZoomLevelForClustering
, which disables clustering if the current zoom level exceeds this value. When disabled, all cluster annotations on the map cluster will have one unique location. The current zoom level can be queried with the propertyzoomLevel
. Thanks to tspacek for the code and onato and iGriever for suggesting this feature.- There's also a new property
minUniqueLocationsForClustering
that controls clustering for a cell based on the number of unique locations in a cell. Clustering is disabled if the number of unique locations in a cell is below this value. - Renamed property
isOneLocation
inCCHMapClusterAnnotation
toisUniqueLocation
- Removed asserts that triggered the exception 'Invalid map length' because my assumption that this could never happen was wrong. Thanks to zeyadsalloum and jas54 for helping me find this issue
- Fixed crash that was happening occasionally because the map view was accessed on a background thread. Thanks to zeyadsalloum, bpoplauschi, igordla, and rosskimes for helping me debug this issue
- Multiple
CCHMapClusterController
s can now use the sameMKMapView
instance. This allows you to have multiple groups of clusters where each group has its own settings (thanks to eikebartles for ideas and suggestions) selectAnnotation:andZoomToRegionWithLatitudinalMeters:longitudinalMeters:
will now assert that the right annotation has been passed in. The documentation has also been updated with a better example on how to use this API (thanks to tspacek for the request)- Added the method
mapRect
toCCHMapClusterAnnotation
to calculate the area that includes all clustered annotations. Also added a code recipe on how to use this method to zoom in to a cluster. - Updated code recipe for centering the map without changing the zoom level (thanks to plu for suggesting this)
- Added code recipe for showing callout accessory views dynamically (thanks to SSA111 for suggesting this)
- Added unit tests for animation code (thanks to nferruzzi for the pull request)
- Fixed issue where non-clustered
MKAnnotation
s would be removed from the map view (thanks to rosskimes for the pull request) - Fixed bug that was causing
MKOverlayView
s/MKOverlayRenderer
s to not show up (thanks to rosskimes for the pull request) - Added a settings UI in example to configure clustering
- Updated annotation view in example to use pre-rendered images instead of
drawRect:
for best performance
- Added
removeAnnotations:withCompletionHandler:
toCCHMapClusterController
to remove annotations from clustering (thanks to zeyadsalloum for suggesting this feature) - Fixed bug when rotating map view
- Added new delegate method
mapClusterController:willReuseMapClusterAnnotation:
toCCHMapClusterControllerDelegate
that's called when cluster annotations are reused - Example updated to demonstrate annotation views which adapt to current cluster size
- Bugfixes and performance improvements
- Thanks to onato for suggesting these changes
- Switched to quad tree based on
TBQuadTree
to speed up performance - Clustering now happens on a background thread for improved responsiveness
- Fixed issues when panning across the 180th meridian
- Added option to configure positioning of cluster annotations
- Added option to enable/disable reusing existing cluster annotations
- Added option to configure how cluster annotations are animated
- Added more unit tests and documentation
- Initial release