| basemap {rleafmap} | R Documentation |
Define a Tile Basemap Layer
Description
Define a new basemap layer from a tile server.
Usage
basemap(
URL,
name = NULL,
alpha = 1,
minZoom = 0,
maxZoom = 18,
tileSize = 256,
tms = FALSE
)
Arguments
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 |
Details
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.
Value
An object of class basemap which can be directly used in writeMap.
See Also
spLayer to define data layers.
Examples
## Not run:
#A simple map with two nice basemaps.
bm1 <- basemap("mapquest.map")
bm2 <- basemap("stamen.watercolor")
writeMap(bm1, bm2)
## End(Not run)