| arc_open | R Documentation |
Access a resource on ArcGIS Online, Enterprise, or Location Platform.
arc_open(url, host = arc_host(), token = arc_token())
url |
a url to a service such as a feature service, image server, or map server. Alternatively, an item ID of a portal item or portal url. |
host |
default |
token |
an |
To read the underlying attribute data from a FeatureLayer, Table, or ImageServer use arc_select().
If you have a MapServer or FeatureSever access the individual layes using get_layer(). For
Use arc_raster() to get imagery as a terra raster object.
Depending on item ID or URL returns a PortalItem, FeatureLayer, Table, FeatureServer, ImageServer, or MapServer, GeocodeServer, among other. Each of these objects is a named list containing the properties of the service.
arc_select arc_raster get_layer
## Not run:
# FeatureServer ID
arc_open("3b7221d4e47740cab9235b839fa55cd7")
# FeatureLayer
furl <- paste0(
"https://services3.arcgis.com/ZvidGQkLaDJxRSJ2/arcgis/rest/services/",
"PLACES_LocalData_for_BetterHealth/FeatureServer/0"
)
arc_open(furl)
# Table
furl <- paste0(
"https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/",
"USA_Wetlands/FeatureServer/1"
)
arc_open(furl)
# ImageServer
arc_open(
"https://landsat2.arcgis.com/arcgis/rest/services/Landsat/MS/ImageServer"
)
# FeatureServer
furl <- paste0(
"https://services3.arcgis.com/ZvidGQkLaDJxRSJ2/arcgis/rest/services/",
"PLACES_LocalData_for_BetterHealth/FeatureServer"
)
arc_open(furl)
# MapServer
map_url <- paste0(
"https://services.arcgisonline.com/ArcGIS/rest/services/",
"World_Imagery/MapServer"
)
arc_open(map_url)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.