Skip to content

Commit 1db009a

Browse files
committed
Version 1.1.0
1 parent d9a1d4f commit 1db009a

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

ClusterMap.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = 'ClusterMap'
3-
spec.version = '1.0.0'
3+
spec.version = '1.1.0'
44
spec.license = { :type => 'MIT', :file => 'LICENSE' }
55
spec.homepage = 'https://github.com/vospennikov/ClusterMap'
66
spec.authors = { 'efremidze' => 'efremidzel@hotmail.com', 'Mikhail Vospennikov' => 'm.vospennikov@gmail.com' }

README.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ ClusterMap is an open-source library for high-performance map clustering.
99
When you want to present many points over the map for better user experience and performance, you can make clusters from many points. A good starting point is using a native clustering mechanism. It's simple to implement, simple to use, and has nice animations with zero lines of code. The core problem of the native implementation is adding all points to the map in MainThread. You can't avoid this bottleneck, and it's a problem if you want to operate with thousand points.
1010
ClusterMap uses efficient QuadTree storage and performs all computations in the background thread.
1111

12-
Comparison with 20,000 annotations. For a detailed comprasion use [Example](Example).
12+
Comparison with 20,000 annotations. For a detailed comparison, use [Example-UIKit](Example).
1313

1414
![Demo Cluster](Images/demo_cluster.gif) ![Demo MKMapKit](Images/demo_mapkit.gif)
1515

16-
Version 2.0 would support structured swift concurrency and support any map providers (including SwiftUI). This version is coming soon.
17-
1816
- [Features](#features)
1917
- [Demo](#demo)
2018
- [Installation](#installation)
@@ -25,17 +23,19 @@ Version 2.0 would support structured swift concurrency and support any map provi
2523

2624
## Features
2725

26+
- [x] UIKit
27+
- [ ] SwiftUI
28+
- [ ] Swift concurrency
2829
- [x] Adding/Removing Annotations
2930
- [x] Clustering Annotations
3031
- [x] Multiple Managers
3132
- [x] Dynamic Cluster Disabling
3233
- [x] Custom Cell Size
3334
- [x] Custom Annotation Views
34-
- [x] Animation Support
3535

3636
## Demo
3737

38-
The [Example](Example) is a great place to get started. It demonstrates how to:
38+
The [Example](Example) is a great place to start. It demonstrates how to:
3939

4040
- Integrate the library
4141
- Add/remove annotations
@@ -46,29 +46,29 @@ The [Example](Example) is a great place to get started. It demonstrates how to:
4646

4747
## Installation
4848

49-
ClusterMap is available via Swift Package Manager
49+
ClusterMap is available via Swift Package Manager.
5050

5151
### Swift Package Manager
5252

5353
Add the following dependency to your **Package.swift** file:
5454

5555
```swift
56-
.package(url: "https://github.com/vospennikov/ClusterMap.git", from: "1.0.0")
56+
.package(url: "https://github.com/vospennikov/ClusterMap.git", from: "1.1.0")
5757
```
5858

5959
### Cocoapods
6060

61-
ClusterMap is available through CocoaPods. To install it, simply add the following line to your Podfile:
61+
ClusterMap is available through CocoaPods. To install it, add the following line to your Podfile:
6262

6363
```ruby
64-
pod 'ClusterMap', '1.0.0'
64+
pod 'ClusterMap', '1.1.0'
6565
```
6666

6767

6868
## Usage
6969

7070
### The Basics
71-
The `ClusterManager` class generates, manages and displays annotation clusters.
71+
The `ClusterManager` class generates, manages, and displays annotation clusters.
7272

7373
```swift
7474
let clusterManager = ClusterManager()
@@ -86,7 +86,7 @@ manager.add(annotation)
8686

8787
### Configuring the Annotation View
8888

89-
Implement the map views `mapView(_:viewFor:)` delegate method to configure the annotation view. Return an instance of `MKAnnotationView` to display as a visual representation of the annotations.
89+
Implement the map view's `mapView(_:viewFor:)` delegate method to configure the annotation view. Return an instance of `MKAnnotationView` to visually represent the annotations.
9090

9191
To display clusters, return an instance of `ClusterAnnotationView`.
9292

@@ -106,7 +106,7 @@ For performance reasons, you should generally reuse `MKAnnotationView` objects i
106106

107107
#### Customizing the Appearance
108108

109-
The `ClusterAnnotationView` class exposes a `countLabel` property. You can subclass `ClusterAnnotationView` to provide custom behavior as needed. Here's an example of subclassing the `ClusterAnnotationView` and customizing the layer `borderColor`.
109+
The `ClusterAnnotationView` class exposes a `countLabel` property. You can subclass `ClusterAnnotationView` to provide custom behavior as needed. Here's an example of subclassing the `ClusterAnnotationView` and customizing the layer `borderColor`.
110110

111111
```swift
112112
class CountClusterAnnotationView: ClusterAnnotationView {
@@ -122,17 +122,17 @@ See the [AnnotationView](Example/Shared/Views/CountClusterAnnotationView.swift)
122122

123123
### Removing Annotations
124124

125-
To remove annotations, you can call `remove(annotation:)`. However the annotations will still display until you call `reload()`.
125+
To remove annotations, you can call `remove(annotation:)`. However, the annotations will still display until you call `reload()`.
126126

127127
```swift
128128
manager.remove(annotation)
129129
```
130130

131-
In the case that `shouldRemoveInvisibleAnnotations` is set to `false`, annotations that have been removed may still appear on map until calling `reload()` on visible region.
131+
If `shouldRemoveInvisibleAnnotations` is set to `false`, annotations that have been removed may still appear on the map until calling `reload()` on the visible region.
132132

133133
### Reloading Annotations
134134

135-
Implement the map views `mapView(_:regionDidChangeAnimated:)` delegate method to reload the `ClusterManager` when the region changes.
135+
Implement the map view's `mapView(_:regionDidChangeAnimated:)` delegate method to reload the `ClusterManager` when the region changes.
136136

137137
```swift
138138
func mapView(_ mapView: MKMapView, regionDidChangeAnimated animated: Bool) {
@@ -155,12 +155,12 @@ var minCountForClustering: Int // The minimum number of annotations for a cluste
155155
var shouldRemoveInvisibleAnnotations: Bool // Whether to remove invisible annotations. The default is `true`.
156156
var shouldDistributeAnnotationsOnSameCoordinate: Bool // Whether to arrange annotations in a circle if they have the same coordinate. The default is `true`.
157157
var distanceFromContestedLocation: Double // The distance in meters from contested location when the annotations have the same coordinate. The default is `3`.
158-
var clusterPosition: ClusterPosition // The position of the cluster annotation. The default is `.nearCenter`.
158+
var clusterPosition: ClusterAlignment // The position of the cluster annotation. The default is `.nearCenter`.
159159
```
160160

161161
### ClusterManagerDelegate
162162

163-
The `ClusterManagerDelegate` protocol provides a number of functions to manage clustering and configure cells.
163+
The `ClusterManagerDelegate` protocol provides many functions to manage clustering and configure cells.
164164

165165
```swift
166166
// The size of each cell on the grid at a given zoom level.
@@ -175,6 +175,7 @@ func shouldClusterAnnotation(_ annotation: MKAnnotation) -> Bool { ... }
175175
The documentation for releases and `main` are available here:
176176

177177
* [`main`](https://vospennikov.github.io/ClusterMap/main/documentation/clustermap)
178+
* [1.1.0](https://vospennikov.github.io/ClusterMap/1.1.0/documentation/clustermap)
178179
* [1.0.0](https://vospennikov.github.io/ClusterMap/1.0.0/documentation/clustermap)
179180

180181
## Credits

0 commit comments

Comments
 (0)