addProviderEspTiles {mapSpain} | R Documentation |
Include base tiles of Spanish public administrations on a leaflet map
Description
Include tiles of public Spanish organisms to a leaflet::leaflet()
map.
Usage
addProviderEspTiles(
map,
provider,
layerId = NULL,
group = NULL,
options = providerEspTileOptions()
)
providerEspTileOptions(...)
Arguments
map |
the map to add the tile layer to |
provider |
Name of the provider, see esp_tiles_providers for values available. |
layerId |
the layer id to assign |
group |
the name of the group the newly created layers should belong to
(for |
options |
tile options |
... |
Arguments passed on to |
Details
providerEspTileOptions()
is a wrapper of leaflet::providerTileOptions()
.
Value
A modified leaflet::leaflet()
map
object.
Source
https://dieghernan.github.io/leaflet-providersESP/ leaflet plugin, v1.3.3.
See Also
leaflet::leaflet()
, leaflet::addTiles()
leaflet::providerTileOptions()
, leaflet::tileOptions()
Other imagery utilities:
esp_getTiles()
,
esp_make_provider()
,
esp_tiles_providers
Examples
library(leaflet)
leafmap <- leaflet(width = "100%", height = "60vh") %>%
setView(lat = 40.4166, lng = -3.7038400, zoom = 10) %>%
addTiles(group = "Default (OSM)") %>%
addProviderEspTiles(
provider = "IDErioja.Claro",
group = "IDErioja Claro"
) %>%
addProviderEspTiles(
provider = "RedTransporte.Carreteras",
group = "Carreteras"
) %>%
addLayersControl(
baseGroups = c("IDErioja Claro", "Default (OSM)"),
overlayGroups = "Carreteras",
options = layersControlOptions(collapsed = FALSE)
)
leafmap