basemap | R Documentation |
Define a new basemap layer from a tile server.
basemap(
URL,
name = NULL,
alpha = 1,
minZoom = 0,
maxZoom = 18,
tileSize = 256,
tms = FALSE
)
URL |
a character string giving the tile server url or a the name of a pre-configured server. |
name |
a character string to name the layer. |
alpha |
a numeric value in |
minZoom, maxZoom |
numeric values setting the minimum and maximum zoom level. |
tileSize |
a numeric value setting tile size (width and height in pixels, assuming tiles are square). |
tms |
logical. If |
URL
should have the form 'http://{s}.somedomain.com/somepath/{z}/{x}/{y}.png'
with {s}
a facultative subdomain, {z}
the zoom level and {x}
, {y}
the coordinates.
rleafmap comes with a list of pre-configured servers. Names of these servers are returned
by the function bmSource
.
An object of class basemap
which can be directly used in writeMap
.
spLayer
to define data layers.
## Not run:
#A simple map with two nice basemaps.
bm1 <- basemap("mapquest.map")
bm2 <- basemap("stamen.watercolor")
writeMap(bm1, bm2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.