riatelab / maptiles

Download, compose and display map tiles with R
97 stars 12 forks source link

Cannot download tiles in webp format #28

Closed tadhg-moore closed 10 months ago

tadhg-moore commented 10 months ago

I am trying to download tiles from a new basemap generate for New Zealand (https://basemaps.linz.govt.nz/) but the tiles are in the .webp format rather than jpg or png format.

prov <- maptiles::create_provider(name = "LINZ",
                                    url = paste0("https://basemaps.linz.govt.nz/v1/tiles/aerial/WebMercatorQuad/{z}/{x}/{y}.webp?api=", apikey),
                                    citation = "LINZ")
tiles <- maptiles::get_tiles(x = shape, provider = prov, zoom = zoom,
                                 verbose = verbose)
# Error in as.vector(x, "character") : 
#  cannot coerce type 'closure' to vector of type 'character'
rCarto commented 10 months ago

Thanks for the PR!