Many points with d3 and leaflet

Update 07/2025: recovered brushing demo here: https://www.sumbera.com/gist/js/d3/brushing.html

recovered d3 and leaflet demo: https://www.sumbera.com/gist/js/leaflet/svg/ManyPointsd3.html

Update August 2015: check “scaled”- based fast SVG rendering on top of Leaflet here

manypoints

Testing SVG limits of plotting points on map using D3, Leaflet following this base sample:http://bost.ocks.org/mike/leaflet. However instead of scaling SVG in deep zooms, I am using Enter/Update/Exit pattern from D3 to dynamically update points on map. This has been prototyped also here http://bl.ocks.org/sumbera/9972460 with brushing of 100T points.

For zooming out (causing all points to be displayed), I am filtering out points that can’t be effectively visible, thus reducing number of points in SVG. (check console for log output).

This sample is using real data of 24T coordinates where points are clustered around cities, rather than artifically randomized. Real number of rendered points / removed points can be seen in console

Test page : http://bl.ocks.org/sumbera/10463358

2 thoughts on “Many points with d3 and leaflet

Comments are closed.