| user_arcgis_basemap | R Documentation |
Create a basemap layer linking to an User-supplied ArcGIS mapserver.
user_arcgis_basemap(url, name = "", attributions = "", toggle.control = FALSE)
url |
character url string where the map server is located. Typically these urls end with "/MapServer". |
name |
character layer name. |
attributions |
character HTML. This HTML will render as attributional text at the bottom-right corner of the map. At a minimum, this text should include the copyright text provided on the map server. |
toggle.control |
logical. If |
Creates and returns an OpenLayers ArcGIS Tile layer that sources a map server at a user-supplied URL.
A Layer.ArcGIS S3 object.
ol_map,
+.Ol.Map,
nga_basemap,
public_OSM_basemap,
public_arcgis_basemap
server.url <- "http://server.arcgisonline.com/arcgis/rest/services/NatGeo_World_Map/MapServer"
mymap <- ol_map()
attrib <- paste(
"Content may not reflect National Geographic's current map policy.",
"Sources: National Geographic, Esri, Garmin, HERE,",
"UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, increment P Corp",
sep=" " # long attribution!
)
base.layer <- user_arcgis_basemap(
server.url,
attributions = attrib,
toggle.control=TRUE
)
mymap <- mymap + base.layer
## Not run:
ol_map2HTML(
mymap,
"SanDiego_NatGeo.html",
map.note = sprintf(
"I found this at <a href='%s'>arcgisonline.com</a>",
server.url
)
)
browseURL("SanDiego_NatGeo.html")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.