Learn R Programming

bioRad (version 0.4.0)

download_basemap: Download a basemap for map(ppi)

Description

Downloads a Google Maps, OpenStreetMap, Stamen Maps or Naver Map base layer map using get_map.

Usage

download_basemap(x, verbose = TRUE, zoom, alpha = 1,
  source = "stamen", ...)

Arguments

x

An object of class ppi.

verbose

Logical, whether to print information to console.

zoom

Zoom level (optional), see get_map. An integer from 3 (continent) to 21 (building). By default the zoom level matching the ppi extent is selected automatically.

alpha

Transparency of the basemap (0-1).

source

String identifying which map service should be used: "google", "osm" or "stamen"

...

Arguments to pass to get_map function. Note arguments maptype and source for selection of different types of basemaps.

Examples

Run this code
# NOT RUN {
# load an example scan:
data(example_scan)
# print summary info for the scan:
example_scan
# make ppi for the scan
ppi <- project_as_ppi(example_scan)
# grab a basemap that matches the extent of the ppi:
# }
# NOT RUN {
basemap <- download_basemap(ppi)
# map the reflectivity quantity of the ppi onto the basemap:
map(ppi, map = basemap, param = "DBZH")
# download a different type of basemap, e.g. satellite imagery:
# see get_map() in ggmap library for full documentation of options
basemap <- download_basemap(ppi, maptype = "satellite")
# map the radial velocities onto the satellite imagery:
map(ppi, map = basemap, param = "VRADH")
# }

Run the code above in your browser using DataLab