ol_map | R Documentation |
Create an OpenLayers Map Object.
ol_map(zoom = 10, center = c(-117.1611, 32.7157))
zoom |
integer map initial zoom level. |
center |
numeric vector of length 2 containing decimal longitude and latitude coordinates for initial map center. |
This function creates a new S3 OpenLayers Map object with no layers.
If ol.source.url
is NULL
and nga.olsource
is
FALSE
, OpenLayers Javascript source will be embedded directly
into the HTML when ol_map2HTML
or
ol_map2Strings
is called.
Otherwise, the output HTML/Javascript with source the OpenLayers library
according to the value of ol.source.url
, or the NGA hosted
OpenLayers library if nga.olsource
is TRUE
.
A list object of class Ol.Map
.
ol_map2HTML
,
ol_map2Strings
,
public_OSM_basemap
,
nga_basemap
,
public_arcgis_basemap
,
user_arcgis_basemap
miami.OSM.basemap <- ol_map( center=c(-80.385790,25.782618), zoom=9 ) + streetmap() ## Not run: ol_map2HTML( miami.OSM.basemap, 'miami.html', map.heading="Miami, FL" ) browseURL("miami.html") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.