1

Does anyone have any experience with mapbox basemaps in R leaflet?

The font is too small on my map. I have tried to change the zoomOffset and tileSize as detailed in this question, and in the tileOptions here, but no success.

library(leaflet)

leaflet_url <- "https://api.mapbox.com/styles/v1/williamlai/ckiy242l16cli19mvze8sqlpp/tiles/{z}/{x}/{y}?access_token={access_token}"

# mapbox basemap - font is too small
leaflet() %>%
  addTiles(urlTemplate = leaflet_url,
           tileOptions(tileSize = 512, zoomOffset = -1)) %>%  # the options don't seem to work
  addMarkers(lng=174.768, lat=-36.852)

enter image description here

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.