View source: R/utils-requests.R
fetch_layer_metadata | R Documentation |
Utility functions for feature service metadata.
fetch_layer_metadata(url, token = NULL, call = rlang::caller_env())
url |
the url of the item. |
token |
an |
call |
default |
fetch_layer_metadata()
given a request, fetches the metadata by setting
the query parameter f=json
returns a list object
# url is broken into parts to fit within 100 characters to avoid CRAN notes
url_parts <- c(
"https://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services",
"/USA_Counties_Generalized_Boundaries/FeatureServer/0"
)
furl <- paste0(url_parts, collapse = "")
meta <- fetch_layer_metadata(furl)
head(names(meta))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.