osmGet: Plot OSM basemap (deprecated)

Description Usage Arguments Details Examples

Description

Convenience wrapper around the openmap() function to return the basemap around an input geometry. This has been deprecated in favor of topleft() and bottomright().

Usage

1
osmGet(geom, tolerance = 2, tileserver = "skobbler")

Arguments

geom

Input geometry (polygon)

tolerance

multiplier for the size of the bounding box around the input geometry

tileserver

see the openmap() documentation for options

Details

Note: for now it really only works around a polygon

Examples

1
2
3
4
5
basemap = osmGet(cambridge_town, tolerance = 1.5, tileserver = "mapbox")
plot(basemap)
# skobbler maps look better with a little purple haze
plot(spTransform(gBoundingPoly(cambridge_town, tolerance = 1.5), osm()), add = T, col = col2hex("lavender", "40"), border = NA)
plot(spTransform(cambridge_town, osm()), add = T, col = col2hex("skyblue", "80"))

townleym/mSpatial documentation built on May 31, 2019, 6:46 p.m.