Comments (6)
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.
🎉 This issue has been resolved in version 2.4.0 🎉
The release is available on:
- GitHub release
npm package (@latest dist-tag)
v2.4.0
Your semantic-release bot 📦🚀
from js-markerclusterer.
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.
Good suggestion on the configuration option.
from js-markerclusterer.
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.
Please submit a pr! 😄
from js-markerclusterer.
Related Issues (20)
- After creating a MarkerClusterer unable to register 'mouseover' event on the clusterer object HOT 4
- [Markers] Using AdvancedMarkerElement with a `lat` or `lng` of 0 results in it not being drawn. HOT 1
- Markerclusterer: Property 'radius' does not exist on type 'SuperClusterViewportOptions'. HOT 17
- Avoid direct assignment of innerHTML for Advanced Marker-based cluster pins HOT 1
- AdvancedMarker not showing up when cluster is expanded (was: Incorrect display of markers on click(onClusterClick) on markercluster) HOT 6
- The Markercluster icons on the wall overlap each other, you need to add padding between the icons. HOT 2
- Allow option of zooming in just enough so that the markers are unclustered, as opposed to zooming in just on the clustered markers HOT 2
- Angular support? HOT 2
- Export MarkerUtils class so it can be used for custom algorythms HOT 2
- is there any way for this to be an extension or some way for me to use it? HOT 1
- MarkerClusterer: unnecessary rerendering of clusters when nothing has changed HOT 1
- Property 'radius' does not exist on type 'SuperClusterViewportOptions' HOT 6
- The property 'setIcon' does not exist for the type 'Marker'. HOT 3
- Problems with versions > `2.5.0` HOT 2
- Clusters blinking on updating its markers HOT 2
- Cluster is added behind advanced marker which near to cluster location HOT 1
- Option to ignore hidden markers HOT 1
- feat(DefaultRenderer): custom color
- SuperClusterViewportAlgorithm at zoom 0-3 not working. HOT 1
- Calculate custom count in custom cluster icon HOT 2
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 js-markerclusterer.