Leaflet / Leaflet.markercluster

Marker Clustering plugin for Leaflet
MIT License
3.97k stars 1k forks source link

Clustering a large number of points #356

Closed vadvv closed 10 years ago

vadvv commented 10 years ago

I'm having a problem clustering a large number of points (my current set is 40K+ points, but I've even gone down to about 15K points). It takes very long to cluster, and then when zooming in/out it takes similar time for the layer to render. Most of the time the browser (in my case Chrome) asks to kill the tab.

I should add that to overcome this, I had decided to show the data as a heat map until a zoom level is reached, after which I thought I could show the cluster with the flag removeOutsideVisibleBounds set to true, but that didn't seem to help either and resulted in the same delay.

Is anyone else experiencing this issue?

danzel commented 10 years ago

Does the 10k or 50k example run fine? http://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld.10000.html http://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld.50000.html

How are you configuring your markercluster?

vadvv commented 10 years ago

Yes, your implementations do work, and it's plenty fast. I didn't see "chunkedLoading" as an option in the documentation and so wasn't aware of it. it has helped but only slightly.

I am using Leaflet via this Anguar directive: https://github.com/tombatossals/angular-leaflet-directive And it appears there is something in the implementation that's causing the delay.

I'll debug that code to see what I can come up with because there's nothing wrong with Leaflet.

Thanks for looking into it.

danzel commented 10 years ago

Cool. I'll add an issue for chunkedLoading documentation

dud3 commented 9 years ago

@danzel I have the same issue, using the angular directive for Leaflet, just like @vadvv and it takes a lot of time to in zoom/in-out.

Example: http://dev.yachtingsbest.com/ Code: http://dev.yachtingsbest.com/src/app/controllers/spotsCtrl.js

@vadvv did you find any solution to this one ?

vadvv commented 9 years ago

Sorry dud3. No luck yet. I ended up violating DI and using the original library since the number of points I was working with in the worst case scenario was in the 50K to 200K range.