Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leaflet.D3SvgOverlay browser freeze with Leaflet.Draw #37

Open
elfflames opened this issue Oct 15, 2018 · 3 comments
Open

Leaflet.D3SvgOverlay browser freeze with Leaflet.Draw #37

elfflames opened this issue Oct 15, 2018 · 3 comments

Comments

@elfflames
Copy link

I created a leaflet layer by using the "Leaflet.D3SvgOverlay" plugin and geojson data. Later I added a "Leaflet Draw" plugin for drawing polyline, all work correctly but when I zoomIn or zoomOut the browser freeze without any error.

Someone has encountered the same problem?

@veryspry
Copy link

Same issue here. Any updates on this?

@LeGoffMael
Copy link

did you find any solution to this problem ?

@LeGoffMael
Copy link

There is no error in the console so I'm not sure why it crashed, but I found a solution that solves the freeze/crash problem for me:

const svg = L.d3SvgOverlay(function(selection, projection) {
   // your D3 code here 
}, {
   zoomDraw: false // add this to avoid the browser to crash on zoom
});

svg.addTo(map);

I hope this will help someone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants