Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

map.clear() doesn't work properly #3

Closed
GoogleCodeExporter opened this issue Jul 24, 2015 · 6 comments
Closed

map.clear() doesn't work properly #3

GoogleCodeExporter opened this issue Jul 24, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

In the DemoActivity replace OnClusterClick with this:

public void onClusterClick(View view) {
    map.clear();
    map.setClustering(new ClusteringSettings().iconDataProvider(new DemoIconProvider(getResources())));
        MarkerGenerator.addMarkersInPoland(map);
        MarkerGenerator.addMarkersInWorld(map);
    }

Then run the app and click Cluster twice

When inserting a lot of data like in the above example you'll see appearing the 
markers and then the clusters.

It could be useful some function to massively add markers and directly display 
the clusters without inserting and deleting the markers on the map

Original issue reported on code.google.com by verna...@gmail.com on 20 Mar 2013 at 9:53

@GoogleCodeExporter
Copy link
Author

Original comment by maciek.g...@gmail.com on 22 Mar 2013 at 1:29

  • Changed state: Accepted
  • Added labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

This appears to be a bug in DelegatingGoogleMap.clear() implementation.

For now you can change map.clear() with the following code:

for (Marker marker : map.getMarkers()) {
    marker.remove();
}

Original comment by maciek.g...@gmail.com on 22 Mar 2013 at 1:37

@GoogleCodeExporter
Copy link
Author

Issue 2 has been merged into this issue.

Original comment by maciek.g...@gmail.com on 24 Mar 2013 at 6:30

@GoogleCodeExporter
Copy link
Author

Original comment by maciek.g...@gmail.com on 24 Mar 2013 at 6:31

  • Changed title: map.clear() doesn't work properly

@GoogleCodeExporter
Copy link
Author

map.clear() should be working as of version 1.1.

Thank you for reporting both issues. I haven't even used clear() before.

Original comment by maciek.g...@gmail.com on 24 Mar 2013 at 6:53

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

As a side note. Using map.clear() might not be the best choice for now because 
of the bug in Google Play Services library: 
https://code.google.com/p/gmaps-api-issues/issues/detail?id=4703

Original comment by maciek.g...@gmail.com on 26 Mar 2013 at 11:34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant