Description Usage Arguments Author(s) See Also Examples
Add a custom base map to the list of maps available in the function leaflet
.
1 | addBaseMap(name, title, url, options)
|
name |
Name of the base map. |
title |
Title of the base map, used in the layer control of the resulting map. Optional – if missing, |
url |
URL for the base map. See http://leafletjs.com/reference.html#tilelayer for more information. |
options |
Optional list of additional options. See http://leafletjs.com/reference.html#tilelayer for for a list of valid options. |
François Guillem
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
# duplicates osm base map
addBaseMap(
name="myosm",
title="Duplicated OpenStreetMap",
url="http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
options=list(
attribution='© <a href="http://openstreetmap.org/copyright", target=
"_blank">OpenStreetMap contributors</a>'
)
)
map <- leaflet(base.map="myosm", dest=tempdir())
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.