mapbox / mapbox-gl-leaflet

binding from Mapbox GL JS to the Leaflet API
ISC License
522 stars 155 forks source link

Mapboxgl variable is empty during initialization #112

Closed dmis53 closed 4 years ago

dmis53 commented 4 years ago

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

https://jsfiddle.net/Lfdy6m59/

dmis53 commented 4 years ago

Good. This is a problem on mapboxgl version 1.5.0

wallheater commented 4 years ago

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.

jgravois commented 4 years ago

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