Overlay points on an OSM plot

Share:

Description

Plot points on a plot created by osm.plot. This is a simple wrapper around points().

Usage

1
osm.points(x, y = NULL, epsg = 4326, toepsg = 3857, ...)

Arguments

x

X coordinate vector or object as parsed by xy.coords

y

Y coordinate vector

epsg

EPSG code of the supplied coordinates

toepsg

EPSG code of the projected coordinates to be ploted

...

Args passed on to points

Examples

1
2
3
4
5
6
7
library(rosm)
library(prettymapr)
locs <- geocode(c("wolfville, ns", "kentville, ns", "halifax, ns"))
prettymap({
  osm.plot(searchbbox("nova scotia"))
  osm.points(locs$lon, locs$lat, pch=18, cex=0.7)
})