Code Monkey home page Code Monkey logo

Comments (4)

p-lr avatar p-lr commented on August 22, 2024 3

I went ahead and integrated the feature into the library. It turned out to be harder than I thought, as it required a revamp of the internals (just the markers feature).
The initial demo was more of a stress test (400 markers is quite a lot), so i moved it into the test app which was done for this purpose.
The demo app now has a "Marker clustering" demo. The issue with the cluster not revealing its markers at max scale is fixed. Also, by default, when a cluster is clicked, the map is zoomed just enough to reveal the content. This behavior can be disabled, or changed.

Since this is a brand new api, user code must use the @OptIn(ExperimentalClusteringApi::class), to acknowledge the fact that these clustering apis might evolve.
Any feedback is welcome!

from mapcompose.

p-lr avatar p-lr commented on August 22, 2024 1

Yes it should possible to have a library support for that, and it's already possible to have a user implementation (using the markers API).
A cluster can be seen as a special kind of marker. Depending on the scale and scroll, a controller can measure the distance between markers and decide which cluster to add/remove. It's not difficult to do (but not easy nonetheless).

I'll work on that when I have time for this.

from mapcompose.

nachtien avatar nachtien commented on August 22, 2024

wow so cool! Thanks :)

from mapcompose.

p-lr avatar p-lr commented on August 22, 2024

Implemented in 2.1.0

from mapcompose.

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.