2

All the sample available for using leaflet with d3 is using leaflet version 0.7.x which was released in 2015.

Why are all modules and examples using so old leaflet version? For ex:

When I try to update for ex this http://bl.ocks.org/d3noob/9267535 to latest leaflet version it breaks.

Is there any reason why all the example still use so old leaflet version?

Shashwat Tripathi
  • 572
  • 1
  • 5
  • 19

1 Answers1

3

I was able to solve all the breaking changes.

1) Leaflet no longer uses "viewreset" to watch for zoom changes rather it uses "zoom" to monitor zoomin/zoomout.

2) No more uses map._initPathRoot(); to add svg layer.

Shashwat Tripathi
  • 572
  • 1
  • 5
  • 19
  • Is there any other changes in addition to the above changes? I replaced map.on('viewreset', update) with map.on('zoom', update) and commented out map._initPathRoot() still my SVG is not getting rendered though I don't have any error. – Karthik Prasad Oct 31 '17 at 12:01
  • @KarthikPrasad Did you solve the issue? My tooltips stopped working after moving beyond leaflet 0.7 – Chris Jun 15 '20 at 18:42
  • @Chris you check this https://github.com/kprasad99/angular-d3-leaflet, however I created this 3 years back not sure how well it will get along now. – Karthik Prasad Jun 16 '20 at 04:38