hypertidy/ceramic

Type argument not working in cc_location

natereal opened this issue · 3 comments

The type argument is not working for me for anything other than the default selection:

library(ceramic)
## a point in longlat, and a buffer with in metres
pt <- cbind(136, -34)
im <- cc_location(pt, buffer = c(1e6, 5e5), type = "mapbox.satellite")
#> Preparing to download: 12 tiles at zoom = 6 from 
#> https://api.mapbox.com/v4/mapbox.satellite/
im <- cc_location(pt, buffer = c(1e6, 5e5), type = "mapbox.outdoors")
#> Preparing to download: 12 tiles at zoom = 6 from 
#> https://api.mapbox.com/v4/mapbox.outdoors/
#> Error in curl::curl_download(url = api_query, outfile) : HTTP error 410.
> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=English_Ireland.1252  LC_CTYPE=English_Ireland.1252    LC_MONETARY=English_Ireland.1252
[4] LC_NUMERIC=C                     LC_TIME=English_Ireland.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] osmdata_0.1.6   ceramic_0.6.0   tmaptools_3.1-1 tmap_3.3-2      raster_3.4-13   sp_1.4-5       

loaded via a namespace (and not attached):
 [1] bitops_1.0-7            fs_1.5.0                sf_1.0-2                lubridate_1.7.10       
 [5] RColorBrewer_1.1-2      httr_1.4.2              tools_4.0.2             utf8_1.2.2             
 [9] rgdal_1.5-27            R6_2.5.1                KernSmooth_2.23-20      DBI_1.1.1              
[13] colorspace_2.0-2        mapmisc_1.8.0           OpenStreetMap_0.3.4     tidyselect_1.1.1       
[17] leaflet_2.0.4.1         curl_4.3.2              compiler_4.0.2          leafem_0.1.6           
[21] rvest_1.0.1             xml2_1.3.2              microbenchmark_1.4-7    scales_1.1.1           
[25] classInt_0.4-3          readr_2.0.1             proxy_0.4-26            rappdirs_0.3.3         
[29] stringr_1.4.0           digest_0.6.27           base64enc_0.1-3         dichromat_2.0-0        
[33] jpeg_0.1-9              pkgconfig_2.0.3         htmltools_0.5.2         fastmap_1.1.0          
[37] htmlwidgets_1.5.4       rlang_0.4.11            rstudioapi_0.13         generics_0.1.0         
[41] jsonlite_1.7.2          crosstalk_1.1.1         dplyr_1.0.7             magrittr_2.0.1         
[45] s2_1.0.6                Rcpp_1.0.7              munsell_0.5.0           fansi_0.5.0            
[49] abind_1.4-5             lifecycle_1.0.0         stringi_1.7.4           leafsync_0.1.0         
[53] yaml_2.2.1              plyr_1.8.6              grid_4.0.2              promises_1.2.0.1       
[57] parallel_4.0.2          crayon_1.4.1            lattice_0.20-44         stars_0.5-3            
[61] hms_1.1.0               pillar_1.6.2            rjson_0.2.20            codetools_0.2-18       
[65] wk_0.5.0                XML_3.99-0.6            glue_1.4.2              leaflet.providers_1.9.0
[69] png_0.1-7               vctrs_0.3.8             tzdb_0.1.2              httpuv_1.6.3           
[73] RgoogleMaps_1.4.5.3     gtable_0.3.0            purrr_0.3.4             tidyr_1.1.3            
[77] slippymath_0.3.1        assertthat_0.2.1        ggplot2_3.3.5           lwgeom_0.2-7           
[81] e1071_1.7-9             later_1.3.0             rosm_0.2.5              class_7.3-19           
[85] viridisLite_0.4.0       tibble_3.1.4            rJava_1.0-4             units_0.7-2            
[89] ggmap_3.0.0             ellipsis_0.3.2   

sorry I don't know why that is, I think mapbox.outdoors just doesn't work anymore in public access

you are supposed to be able to use custom styles (with your key), but I haven't been able to get it working

if I figure it out I'll come back with something

Ok, it looks like a Mapbox issue but I got the impression they were included (from Mapbox). Thanks for that, much appreciated!

we can only do 'mapbox.satellite' or 'mapbox.terrain-rgb' now. You otherwise need to create your own style as use that as base_url.