Comments (2)
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.
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)
- cluster onClick event
- "broken" link in readme HOT 1
- tooltips with permanent option issue HOT 1
- Possible to use X/Y point coordinates instead of LatLng? HOT 1
- Question: Cluster by distance HOT 4
- Cluster not updated for custom data fields
- Cluster not updating custom (rotationAngle & rotationOrigin) data fields in realtime HOT 1
- Cluster not updating custom (rotationAngle & rotationOrigin) data fields in realtime HOT 1
- PruneCluster webpack compability with newest exports-loader
- z-index for different clusters
- Change speed of the moving marker when .move is used? HOT 1
- Svelte Import issue
- prune cluster in vue js
- Touch not working with latest Samsung browser HOT 3
- Is there any feature so we can toggle between cluster and markers? HOT 3
- Open the popup of a marker in the programm HOT 2
- showCoverageOnHover PruneCluster
- markerPop and clustering conflicting
- popups keepInView: false,
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prunecluster.