itsbonczek/kingpin — pull request #32 by stanislaw (2014-04-21 19:25:16+00:00)
Title: Refactoring #1: abstraction/extraction of clustering algorithm.

Changelog:

- Clustering algorithm is extracted into a separate class `KPGridClusteringAlgorithm`.
- The tests are written for `KPGridClusteringAlgorithm`.
- `` now has `treeControllerShouldClusterAnnotations:` method.
- `KPTreeController` was refactored to have a cleaner private interface.

----

__Warning!__ This PR contains __one backward-incompatible public API change__ which needs your approval and corresponding reflection in docs if you'll like it:

All configuration options are extracted into special `KPConfiguration` class, so currently configuration of kingpin is done like:

```objective-c
self.treeController2 = [[KPTreeController alloc] initWithMapView:self.mapView];
self.treeController2.delegate = self;

self.treeController2.configuration.animationOptions = UIViewAnimationOptionCurveEaseOut;
```

This leads to a cleaner interface of both KPTreeController and its configuration interface.

----

@itsbonczek. Now I am going to wait for your review. Once this merged, I will be ready to continue my further work.