4 ms·
D3 is an excellent tool for managing a large array of SVG objects. Connecting it to leaflet is easy, just call function _initPathRoot() on the leaflet map obje
by zjonsson 14y ago
D3 is an excellent tool for managing a large array of SVG objects. Connecting it to leaflet is easy, just call function _initPathRoot() on the leaflet map object, followed by d3.select("#map").select("svg"). Then you can use map.latLngToLayerPoint(..) and map.latLngToLayerPoint(...) leaflet functions to calculate the X,Y coordinates in SVG space.