twotoasters / clusterkraf

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

Add clusterEnabled to Options #30

Open thomasdao opened 10 years ago

thomasdao commented 10 years ago

Hello,

Thank you for this awesome library.

When I use it in my app, some of the points are very near to each other, so when user clicks on the cluster, the cluster does not expand to individual pins.

So I add an option to disable clustering. In my app, whenever zoom exceed some certain level, I just disable clustering so user can access individual pins.

    @Override
    public void onClusteringStarted() {
        if (map == null) {
            return;
        }
        if (map.getCameraPosition().zoom >= 15) {
            options.setClusterEnabled(false);
        } else {
            options.setClusterEnabled(true);
        }
    }
JWvanV commented 10 years ago

Why hasn't this been merged yet?