Closed mrworthington closed 2 years ago
Mapbox token can be set via environment variable MAPBOX_ACCESS_TOKEN
or with option rdeck.mapbox_access_token
. In shiny (own server, not shinyapps), we set the token via environment variable with {dotenv}
.
I haven't used shinyapps, but I'm surprised it doesn't support supplying environment variables.
Edit: It appears that shinyapps supports .Renviron
, so you might just put your token there.
Got it. That's what I did. Thanks!
Hi,
I've loaded an R Deck into shinyapps.io. Everything works fine, except I can't seem to figure out a way to get my map box key to be read on shinyapps.io, so locally, you can see the mapbox tiles, but when it's hosted, the tiles are missing. Is there a way to do something akin to the following and have that token stored from the local environment onto the shiny app that gets hosted?
Local Render
Shinyapps.io