Build qmap object

Description

This function builds the qmap object that forms the basis for the rest of the quickmapr package.

Usage

1
2
3
qmap(..., extent = NULL, order = 1:length(mapdata),
  colors = 1:length(mapdata), fill = FALSE, prj = TRUE,
  basemap = c("none", "1m_aerial", "topo"), resolution = 300)

Arguments

...

Spatial objects to map. Maybe passed as objects, a list of spatial objects, or a qmap object

extent

A sp or raster object to use as the initial extent of the map. Defaults to the maximum extent of all input object

order

draw order of the spatial object. Defaults to order in mapdata

colors

line colors. Defaults to 1:length(mapdata)

fill

Logical to determine if polygons should be filled (using colors) or just the border colored.

prj

Logical to check projections of input spatial objects. Transformation, if needed, should be done prior to mapping with sp::spTransform().

basemap

a basemap generated from get_basemap

resolution

Specifies the width in pixels of the retrieved basemap. Larger values result in higher resolution images but since the images are downloaded for each zoom level can result in delays. Default is 300, while ~600 is a decent compromise for performance and image quality.

Value

Function displays a map from the input mapdata parameter and returns a recorded plot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
data(lake)
mymap<-list(elev,lake,buffer,length,samples)
qm<-qmap(mymap)
#change draw order and which data is displayed
qmap(qm,order=c(2,3,5))
#add a basemap
qm<-qmap(qm,basemap="1m_aerial", resolution = 800)

## End(Not run)