# NOT RUN {
library(prettymapr)
ns <- searchbbox("Nova Scotia")
cities <- geocode(c("Wolfville, NS", "Windsor, NS", "Halifax, NS"))
ggplot(cities, aes(x=lon, y=lat)) + geom_spatial(crsto=26920)
# default projection is Spherical Mercator (EPSG:3857)
ggplot(cities, aes(x=lon, y=lat)) + geom_spatial() + coord_map()
# }
# NOT RUN {
# plot a number of spatial objects
ggplot() +
geom_spatial(longlake_waterdf, fill="lightblue") +
geom_spatial(longlake_marshdf, fill="grey", alpha=0.5) +
geom_spatial(longlake_streamsdf, col="lightblue") +
geom_spatial(longlake_roadsdf, col="black") +
geom_spatial(longlake_buildingsdf, pch=1, col="brown", size=0.25) +
coord_map()
# }
Run the code above in your browser using DataLab