Actual: Error in developer console: caught TypeError: Cannot read properties of undefined (reading 'Map')
Logs
MapBoxGLLayer.js:143:
Uncaught TypeError: Cannot read properties of undefined (reading 'Map')
at e._initGL (MapBoxGLLayer.js:143:32)
at e.onAdd (MapBoxGLLayer.js:42:10)
at e._layerAdd (Layer.js:114:8)
at e.whenReady (Map.js:1477:13)
at e.addLayer (Layer.js:172:8)
at e.addTo (Layer.js:52:7)
at e._asyncAdd (VectorBasemapLayer.js:180:20)
at e.onAdd (VectorBasemapLayer.js:133:12)
at e._layerAdd (Layer.js:114:8)
at e.whenReady (Map.js:1477:13)
_
Describe the bug
When developing locally, we have the pattern of including
maplibre-gl
andesri-leaflet-vector-debug.js
as separate script tags. This works fine:https://github.com/Esri/esri-leaflet-vector/blob/291e1add45b3cc2869d32b3dd13634c3f60ee51b/examples/quickstart-dev.html#L16-L20
But when trying to use the same pattern with the CDN build (https://unpkg.com/esri-leaflet-vector@3.1.5/dist/esri-leaflet-vector-debug.js), I get an error (see reproduction case below).
Reproduction
Load https://jsbin.com/lidiviqowo/edit?html,output
caught TypeError: Cannot read properties of undefined (reading 'Map')
Logs
System Info
Additional Information
No response