mapbox/mapbox-gl-leaflet

Mapboxgl variable is empty during initialization

dmis53 opened this issue · 3 comments

Because of this, I get an error: Uncaught TypeError: Cannot set property 'accessToken' of undefined

https://jsfiddle.net/Lfdy6m59/

Good. This is a problem on mapboxgl version 1.5.0

Just starting out... I had a similar error, but fix was just to load mapbox-gl.js script before leaflet-mapbox-gl.js.

The README Installation section has it the other way round.

@wallheater good catch. a pull request with a fix would be welcome.