score:1
Accepted answer
You're putting all your D3 stuff inside a SVG container which is managed by Leaflet:
/* We simply pick up the SVG from the map object */
var svg = d3.select("#map").select("svn")
...and Leaflet takes care of moving and zooming around anything which is inside a map container.
is there any way around that?
Yes. Don't reuse Leaflet's <svg>
root containers from L.SVG
renderers for your own purposes.
Source: stackoverflow.com
Related Query
- Make SVGs on top of leaflet map not respond to pan events
- d3 click handler not working on leaflet map layer
- Not all d3 points are showing in correct position on leaflet map
- D3- Drawing line on leaflet map through mouse events
- GeoJson element rendered using D3 not scaling correctly on Leaflet map
- D3 - Why do circles drawn on top of a map not appear in the correct position?
- SVG circles don't get repositioned when zooming leaflet map
- d3-tip offset on svgs within Leaflet, Firefox only, not working
- D3: .transition() not working with events
- D3 - Large GeoJSON File does not show draw map properly using projections
- line on d3 map not forming a curve
- How to add external svg file (by D3.js) to Leaflet map
- d3 Events not triggering
- How to make a tiled image pyramid for leaflet from a non-geographic source
- How to make label in histogram respond to dynamic user input
- d3js v5 + Topojson v3 Map not rendering
- Region name not showing in d3 map
- D3 Map Pan and Zoom Performance on Chrome
- Plot d3 chart on to Leaflet / Mapbox map
- Event viewreset is not fired in leaflet version 1.0.2
- D3 will not load Tree Map
- d3 world map with country click and zoom almost working not quite
- Make SVG transparent with d3 on leaflet
- Using d3.behavior.drag() to pan a map
- How do I get the d3 svg points to stay in their correct position on the leaflet map when zooming?
- Geojson map not showing up
- Export leaflet map WITH SVG layer to image
- Map zoom and pan in d3 js v4 + scale limit
- D3js not projecting longitude/latitude points properly onto topojson map
- d3 circles on a leaflet map
More Query from same tag
- D3 Geo Projection and Blobs
- Adding tooltip to SVG elements with text from an array
- D3 day/hour heatmap - nesting data issue
- calling svg.selectAll(X).data().enter() multiple times
- Desired label in center of pie chart not rendering DC/D3.js
- Sum of all the stacks of stacked bar chart in d3
- not able to load external json file using d3.js
- d3 binding data to a group does not seem to propagate after creation
- D3.js node color based on type
- D3 graph not updating on click
- How to implement Bubble Chart / Circle Packing in React Native?
- How to read a csv file in jsfiddle
- How to make an svg object move in a circular trajectory with a constant speed, D3.js
- d3 - How do I find the correct projection for a country?
- How to make a clickable transition bar graph in d3 v4?
- unable to add scrollbar to svg
- Accessing nested data in stacked bar chart
- jquery and d3: why does my page reload when I use $("svg").remove()?
- d3.js stack layout upgrading from v3 to v4
- Centering svg image used on clustered bar chart
- d3.js pan restricted behaviour
- Why does my D3js line chart fail to render values and x-axis?
- Bar chart with d3.js and an associative array
- d3.js v7 - scaleOrdinal - Color child nodes same as parent
- d3.js center image in bubble chart
- Bars zoom on d3.js
- combining two bar graphs on a single page
- d3 v4 Grouped Bar Chart - .data(fn).enter() is empty
- Filtering CSV records in d3.js enter/update based on user input
- D3 multi-line chart with same color dots