Open SimonCoulombe opened 4 years ago
library(sf) library(ggplot2) library(snapbox) area <- st_bbox( c(xmin = 147, ymin = -43, xmax = 147.7, ymax = -42.65), crs = 4326 ) ggplot() + layer_mapbox(area, scale_ratio = 0.5) Error in get_map_image(bbox = mercator_bbox, map_style = map_style, width = width, : The remote server returned status code 401 in response to the image request
All packages are up to date. Running on kubuntu 20.04
edit: guess it's an issue of setting up a mapbox token, just not sure where to do it.
Yes it's likely that it can't find your mapbox access token. layer_mapbox() takes a mapbox_api_access_token parameter which defaults to Sys.getenv("MAPBOX_ACCESS_TOKEN").
layer_mapbox()
mapbox_api_access_token
Sys.getenv("MAPBOX_ACCESS_TOKEN")
that was it, thanks
All packages are up to date. Running on kubuntu 20.04
edit: guess it's an issue of setting up a mapbox token, just not sure where to do it.