Ensure compatibility with Leaflet 1.0
Closed this issue · 2 comments
epos commented
Leaflet 1.0 is out (http://leafletjs.com/2016/09/27/leaflet-1.0-final.html) but it seems this plugin is no compatible. I get the following error:
Cannot read property 'Util' of undefined esri-leaflet-legend.js:13
w8r commented
closed with the 2.0
release
screamsyk commented
you can change the way of importing it,like this:
window.L = require('leaflet'); window.L.esri = require('esri-leaflet'); window.esriLeafletLegend = require('esri-leaflet-legend');
because in the esri-leaflet-legend.js:
if(typeof window !== 'undefined' && window.L){ factory(window.L, L.esri); }