Giter Site home page Giter Site logo

Comments (2)

mngyng avatar mngyng commented on June 15, 2024 1

What I did was copy the required functions from leaflet.js and include those onto the server. (Not all of them are needed and some of them are front-end specific, making it incompatible with Node.js.)

Following that I created three functions on the server side, for POST requests on "generating clusters", "collecting and doing statistics on members inside of markersArea", and finally "transfering all markers of a certain cluster from backend to frontend if spiderfied (expanded from a cluster into markers)".

Then on the frontend I modified the PruneCluster.js to be included on the client side, making it capable of interacting with the services above.

I ended up with a MESSY CODE that processed a GeoJSON dataset of 100k points/63MB.

Nevertheless, I'll have to say, IT IS SATISFYING to see it actually works.

from prunecluster.

fungiboletus avatar fungiboletus commented on June 15, 2024

Hello,

is it possible refactoring code in PHP to run server side?

Yes you can probably do. However if your data is never move or change, you can consider using another algorithm server side, based on https://github.com/mourner/flatbush or similar. PruneCluster is a good algorithm when you don't have that much data and it's dynamic/moving.

from prunecluster.

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.