Coder Social home page Coder Social logo

Wrong count about android-maps-utils HOT 5 CLOSED

googlemaps avatar googlemaps commented on May 19, 2024
Wrong count

from android-maps-utils.

Comments (5)

broady avatar broady commented on May 19, 2024

Thanks! Glad the library is helpful.

You can call ClusterManager.cluster() to force a re-cluster and a re-draw. You should probably make that call if you're adding a marker after the user presses a button.

Let me know if that fixes your problem.

from android-maps-utils.

cesarferreira avatar cesarferreira commented on May 19, 2024

Many thanks! 👍

ClusterManager.clear();
ClusterManager.addItems(items);
ClusterManager.cluster();

This fixed it! :)

from android-maps-utils.

LunevNF avatar LunevNF commented on May 19, 2024

Hi!
I have the same issue, but after *.clearItems() >> *.addItem() >> *.cluster() I not see cluster markers, only a lot of simple markers. Please, help me =(

from android-maps-utils.

LunevNF avatar LunevNF commented on May 19, 2024

ThisApp.getGlobals().mClusterManager.clearItems();
for (final ArrayList thisPoint : ThisApp.getGlobals().listOfVisiblePoints) {
final LatLng latLng = new LatLng(
Double.parseDouble(thisPoint.get(8)),
Double.parseDouble(thisPoint.get(9)));
MyItem offsetItem = new MyItem(latLng.latitude, latLng.longitude);
ThisApp.getGlobals().mClusterManager.addItem(offsetItem);
}
ThisApp.getGlobals().mClusterManager.cluster();

This code runs after load points data.

from android-maps-utils.

LunevNF avatar LunevNF commented on May 19, 2024

I was try all the ways, but this bug exist. Now I use "clusterer" by nlopez and all works good!

from android-maps-utils.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.