getBaseMapLayers: Get 'ggplot2' layers for a basemap

getBasemapLayersR Documentation

Get ggplot2 layers for a basemap

Description

Function to get a set of ggplot2 layers for a basemap.

Usage

getBasemapLayers(
  czType = c("2020", "2019"),
  xy = FALSE,
  bw = FALSE,
  noBathym = FALSE
)

Arguments

czType

- type of connectivity zone to get ("2020"or "2019")

xy

- flag (T/F) for coordinate type (TRUE=Alaska Albers projection; FALSE=WGS84 lat/lon)

bw

- flag (T/F) for black & white or color scheme

noBathym

- flag (T/F) to not include bathymetry layer (default=FALSE)

Details

If xy is TRUE, 'bathym' and 'map_scale' in the returned list will be NULL (currently). Note that including 'theme' in the basemap simply removes the axis labels, which would otherwise be 'x' and 'y'.

Value

list with ggplot2 layers 'bathym', 'land', 'zones', 'labels', 'map_scale', and 'theme'.

Examples

A default lat/lon basemap in color can be constructed using the following:
require(ggplot2); lst = getBaseMapLayers("2020",FALSE,FALSE); ggplot()+lst$bathym+lst$land+lst$zones+lst$labels+lst$map_scale+lst$theme;

wStockhausen/rIBMS_SnowCrab documentation built on March 30, 2022, 2:54 p.m.