AnsweredAssumed Answered

Trouble vector basemap with d3 sample

Question asked by sjacksonesriaustralia-com-au-esridist Employee on Aug 9, 2017
Latest reply on Aug 9, 2017 by JGravois-esristaff

I found a really cool D3 sample that I want to include on a prototype Hub page that I will be showcasing.


I managed to bash the script into using my hosted feature service, along with referring to a traditional tiled service.

This can be seen here.  This is not using the Esri leaflet library.


However, to match some of the other maps on my page, I need to include the Esri leaflet library so that I can incorporate the Esri dark blue vector tile service.


As soon as I switch from using leaflet-0.5 to the leaflet@1.2.0 (from the vector sample) in the header, along with the latest CSS then I get the following error in the console


leaflet.js:5 Uncaught Error: The provided object is not a Layer.
 at e.addLayer (leaflet.js:5)
 at e.addTo (leaflet.points-layer.js:44)
 at d3_map_vt.html:76
 at d3.v3.js:2011
 at Object.<anonymous> (d3.v3.js:1996)
 at Object.event (d3.v3.js:504)
 at XMLHttpRequest.respond (d3.v3.js:1949)


Would love some help getting this resolved.    I did try to replicate my sample in a JSFiddle, but could not get it to run.