Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

clustering markers on android maps v2 [duplicate]

Recently I worked on an android project in which I managed to add markers to a MapView and cluster those markers if they were too close to each other. Now I have to do the same using the new MapFragment - Google Maps Android API v2.

The markers now are succesfully added to the map, but I can't manage to make the clustering part and I can't find any usuable description about this topic. Do you know a way to implement this using the new API?

Any help would be much appreciated.

like image 431
Analizer Avatar asked Feb 25 '13 08:02

Analizer


People also ask

How do I remove a marker cluster from Google Maps?

Removing all markers You can then clear all the markers using clearMarkers something like this: markerClusterer. clearMarkers(); markers = [];

Which is the preferred method for handling large numbers of markers is to store the data in?

As it turns out, the Android Maps Util Library https://github.com/googlemaps/android-maps-utils seems to be the number one choice when clustering markers.


1 Answers

For anyone still in need of a clustering solution, also take a look at Clusterkraf. It's an Apache v2 licensed open source clustering library for the Google Maps Android API v2. It clusters points based on pixel proximity, animates transitions between clusters when zooming, handles thousands of markers, and supports Android v2.2 and higher.

like image 158
Carlton Whitehead Avatar answered Sep 30 '22 06:09

Carlton Whitehead