this example shows how to draw arbitrary SVGs (in this case circles) with d3 on a leaflet map.
the code can be seen as an extension to Mike Bostock's tutorial on drawing geoJSON shapes within leaflet with d3: https://bost.ocks.org/mike/leaflet/ - and as an update to similar older examples that rely on outdated leaflet versions.
these are the basic steps:
-
create an svg within the leaflet overlay pane:
//this svg holds the d3 visualizations
svg = d3.select(mymap.getPanes().overlayPane).append("svg");