Description Usage Arguments Details Examples

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

and `bottomright()`

.

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

`geom` |
Input geometry (polygon) |

`tolerance` |
multiplier for the size of the bounding box around the input geometry |

`tileserver` |
see the openmap() documentation for options |

**Note**: for now it really only works around a polygon

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"))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.