Giter VIP home page Giter VIP logo

Comments (6)

phil-chp avatar phil-chp commented on June 16, 2024 2

That's an interesting point, we directly assumed it was a bug because of the browser crash and change in src/algorithms/supercluster.ts:96.

We have made another algorithm as suggested.

I'm interested in you mentioning that the current implementation is more optimized for concentrated data, because, that represents our case.
We were confronted with huge performance issues, using 2.3k markers in an approx. area of 30 km².


If you also feel divided by this, and understand the need for a dynamic bounding box in some cases, maybe it would be appealing to introduce it as a SuperClusterOptions?
(This goes hand-in-hand with extendBoundsToPaddedViewport(), so it doesn't feel too far-fetched to add it here.)

Some sort of :

enum bboxStatus {
    WHOLE_GLOBE,
    DYNAMIC,
    CUSTOM
}

function defineBoundingBox(status: bboxStatus = bboxStatus.WHOLE_GLOBE, custom?: number[]): number[] { ... }

If it were to be implemented and added in the docs, it would save lots of time for future people encountering this problem.

from js-markerclusterer.

googlemaps-bot avatar googlemaps-bot commented on June 16, 2024 1

🎉 This issue has been resolved in version 2.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

from js-markerclusterer.

jpoehnelt avatar jpoehnelt commented on June 16, 2024

There is a trade off here that needs to be analyzed further.

  • The current implementation only computes clusters when the zoom has changed but for the entire globe.
  • The implementation in #135 computes clusters every time the map bounds changes but for a smaller region.

Which is better? Might depend on the specifics of the data. If markers are concentrated in a small area, the current implementation is probably more performant. If the markers are more uniform, probably the latter implementation is better.

It is possible to pass your own algorithm to meet your specific data patterns.

from js-markerclusterer.

jpoehnelt avatar jpoehnelt commented on June 16, 2024

Good suggestion on the configuration option.

from js-markerclusterer.

davidpadych avatar davidpadych commented on June 16, 2024

Hi, i have the same performance issue... it would help if this option existed in the supercluster options...
Do you plan to add this option in the next future version? thank you

from js-markerclusterer.

jpoehnelt avatar jpoehnelt commented on June 16, 2024

Please submit a pr! 😄

from js-markerclusterer.

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.