`token` prop for LTileLayer problem
ala747 opened this issue · 2 comments
Hi! I may be missing something but I can't get <l-tile-layer>
working with Mapbox because the token
prop doesn't seem to be there anymore:
I did a quick look in the src code here but didn't find the prop nowhere (beside the examples). Does Vue2leaflet not support the token
prop anymore or it might be set other way?
Thanks in advance!
Hi @ala747 ! Thanks for pointing this out, it looks as if the docs indeed don't match the code in this case. The issue likely arises from the fact that accessToken
is an undocumented Leaflet option that appears to have been contributing to documentation issues for two years now: Leaflet/Leaflet#6336.
However, you should still be able to use this undocumented option through vue2-leaflet:
<l-tile-layer :options="{ accessToken: 'your.mapbox.access.token' } ... />
Does that work for you?
Hi @mikeu ! You are The Man, it actually works like a charm! 😃
I were digging on previous tags and PRs and did found an old params
prop which used to work like your options
but unfortunately it doesn't work either.
Thank you very much for this wrapper and your help, you saved my week!