paleolimbot / ggspatial

Enhancing spatial visualization in ggplot2
https://paleolimbot.github.io/ggspatial
368 stars 34 forks source link

Stamen maps now require API key #122

Open iskandari opened 8 months ago

iskandari commented 8 months ago

FYI https://stamen.com/here-comes-the-future-of-stamen-maps/

This example now throws an error:

cities <- data.frame(
  x = c(-63.58595, 116.41214), 
  y = c(44.64862, 40.19063), 
  city = c("Halifax", "Beijing")
)

ggplot(cities, aes(x, y)) +
  annotation_map_tile(type = "stamenwatercolor") +
  geom_spatial_point() +
  geom_spatial_label_repel(aes(label = city), box.padding = 1) +
  coord_sf(crs = 3995)

Error in `annotation_map_tile()`:
! Problem while converting geom to grob.
ℹ Error occurred in the 1st layer.
Caused by error in `check.dimensions()`:
! Zero tiles were loaded for type stamenwatercolor
Run `rlang::last_trace()` to see where the error occurred.