You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having some trouble adding an API key to access Thunderforest tiles. I'm trying to use ggspatial, but I found some documentation for adding the api key to rosm through source_from_url_format().
However the function does not seem to allow anything after the extension (".jpg", ".png", etc) so I can't pass the API key to the URL in this way.
This works and allows me to pull tiles using ggspatial::annotation_map_tile() but does not take the API key, tiles have the watermark on them,
thunderforest = rosm::source_from_url_format(
url_format = c('http://a.tile.thunderforest.com/landscape/${z}/${x}/${y}.png',
'http://b.tile.thunderforest.com/landscape/${z}/${x}/${y}.png',
'http://c.tile.thunderforest.com/landscape/${z}/${x}/${y}.png'),
attribution = "More on Thunderforest at http://www.thunderforest.com/")
This does not work
> thunderforest = rosm::source_from_url_format(
url_format = c('http://a.tile.thunderforest.com/landscape/${z}/${x}/${y}.png?apikey=<myapikey>',
'http://b.tile.thunderforest.com/landscape/${z}/${x}/${y}.png?apikey=<myapikey>',
'http://c.tile.thunderforest.com/landscape/${z}/${x}/${y}.png?apikey=<myapikey>'),
attribution = "More on Thunderforest at http://www.thunderforest.com/")
Error in match.arg(extension, c("png", "jpeg", "jpg")) :
'arg' should be one of “png”, “jpeg”, “jpg”
The text was updated successfully, but these errors were encountered:
Hi there,
I'm having some trouble adding an API key to access Thunderforest tiles. I'm trying to use
ggspatial
, but I found some documentation for adding the api key torosm
throughsource_from_url_format()
.However the function does not seem to allow anything after the extension (".jpg", ".png", etc) so I can't pass the API key to the URL in this way.
This works and allows me to pull tiles using
ggspatial::annotation_map_tile()
but does not take the API key, tiles have the watermark on them,This does not work
The text was updated successfully, but these errors were encountered: