make_osm_map | R Documentation |
Makes an entire OSM map for the given bbox using the submitted data, or by
downloading data if none submitted. This is a convenience function enabling
an entire map to be produced according to the graphical format specified with
the structures
argument.
make_osm_map(
bbox,
osm_data,
structures = osm_structures(),
dat_prefix = "dat_"
)
bbox |
The bounding box for the map. A 2-by-2 matrix of 4 elements with
columns of min and max values, and rows of x and y values. If |
osm_data |
A list of OSM objects as returned from
|
structures |
A |
dat_prefix |
Prefix for data structures (default |
List of two components:
List of OSM structures each as
Spatial(Points/Lines/Polygons)DataFrame
and appended to
osm_data
(which is NULL
by default), and
The map
as a ggplot2
object
If osm_data
is not given, then data will be downloaded, which can take
some time. Progress is dumped to screen.
osm_basemap
, add_osm_objects
.
Other construction:
add_osm_objects()
,
osm_basemap()
,
osm_structures()
,
print_osm_map()
structures <- c ("highway", "park")
structs <- osm_structures (structures = structures, col_scheme = "light")
# make_osm_map returns potentially modified list of data using the provided
# 'london' data for highways and parks.
dat <- make_osm_map (osm_data = london, structures = structs)
# or download data automatically using a defined bounding boox
bbox <- get_bbox (c (-0.15, 51.5, -0.10, 51.52))
## Not run:
dat <- make_osm_map (bbox = bbox, structures = structs)
print_osm_map (dat$map)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.