mapbox / mapbox-gl-leaflet

binding from Mapbox GL JS to the Leaflet API
ISC License
519 stars 154 forks source link

Make Mapbox GL access token optional #117

Closed CramericaIndustries closed 4 years ago

CramericaIndustries commented 4 years ago

When I try to initialize the map without Mapbox access token I'm getting this error message:

You should provide a Mapbox GL access token as a token option.

However if you are hosting your own tiles and map styles (like I do), no access token is required by mapbox-gl.js to run.

jgravois commented 4 years ago

you can pass any old dummy token you want.

example: https://github.com/Esri/esri-leaflet-vector/blob/8a9b6056b02d17cdfb22d0ffa5fba94e7ea7e45c/src/Util.js#L12-L15

if you want to open a PR to make the parameter optional, it'd be welcome.

JanLoebel commented 4 years ago

Should be fixed with: https://github.com/mapbox/mapbox-gl-leaflet/pull/119

jgravois commented 4 years ago

released as v0.0.12