View source: R/ggMap_getBasemapLayers.R
ggMap_getBasemapLayers | R Documentation |
This function creates a basemap layer for maps based on the ggplot2 package.
ggMap_getBasemapLayers( layer.land = wtsGIS::getPackagedLayer("Alaska"), layer.bathym = wtsGIS::getPackagedLayer("ShelfBathymetry"), final.crs = wtsGIS::get_crs("WGS84"), bbox = wtsROMS::getStandardBBox("CGOA shelf"), colors.bg = "white", colors.land = "grey85", colors.bathym = "darkblue", alpha.bathym = 1 )
layer.land |
- a |
layer.bathym |
- a |
final.crs |
- representation of final (display) coordinate reference system (see details) |
bbox |
- a bounding box (see details; default is "CGOA shelf") |
colors.bg |
- background color |
colors.land |
- color for land |
colors.bathym |
- color for the bathymetry |
alpha.bathym |
- transparency for the bathymetry |
The basemap contains a land layer (polygons) and a bathymetry layer (lines).
Uses getPackagedLayer
or readShapefile
to create the
land and bathymetric layers. If bbox
is NULL, then the
bounding box for the land layer is used as the bounding box for the basemap.
This convenience function delegates all work to gg_CreateBasemapLayers.
The final coordinate reference system (final.crs
) can be any object that
can be converted to a sf::crs
object using get_crs
.
The bounding box (bbox
) can be any object that can be converted
to a link[sf]{bbox}
using getBBox
.
- a list of basemap layers based on the ggplot2 package, with elements #'
bathym - geom_sf layer for bathymetry-based grid polygons
land - geom_sf layer for land-based grid polygons
map_scale - ggplot2 coord_sf object
theme - partial ggplot2 theme with axis titles removed
See also gg_CreateBasemapLayers, getBBox, get_crs, getPackagedLayer, getPackagedLayer, getStandardBBox.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.