rajeswari ratala
rajeswari ratala

Reputation: 710

How to implement marker cluster in android maps v3?

    import com.google.maps.android.MarkerManager;
    import com.google.maps.android.clustering.algo.Algorithm;
    import com.google.maps.android.clustering.algo.NonHierarchicalDistanceBasedAlgorithm;
    import com.google.maps.android.clustering.algo.PreCachingAlgorithmDecorator;
    import com.google.maps.android.clustering.view.ClusterRenderer;
    import com.google.maps.android.clustering.view.DefaultClusterRenderer;

i am getting a error that maps is undefined. i am following the google guide to set up marker clustering. https://developers.google.com/maps/documentation/android-api/utility/marker-clustering

Upvotes: 0

Views: 976

Answers (1)

antonio
antonio

Reputation: 18242

As marker clustering is a funcionality of the Google Maps API Utility Library, you need to add the following dependency to your build.gradle

compile 'com.google.maps.android:android-maps-utils:0.4+'

Upvotes: 2

Related Questions