ol_map: OpenLayers Map

View source: R/ol_map_base.R

ol_mapR Documentation

OpenLayers Map

Description

Create an OpenLayers Map Object.

Usage

ol_map(zoom = 10, center = c(-117.1611, 32.7157))

Arguments

zoom

integer map initial zoom level.

center

numeric vector of length 2 containing decimal longitude and latitude coordinates for initial map center.

Details

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.

Value

A list object of class Ol.Map.

See Also

ol_map2HTML, ol_map2Strings, public_OSM_basemap, nga_basemap, public_arcgis_basemap, user_arcgis_basemap

Examples

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)

cemarks/ROpenLayers documentation built on March 31, 2022, 12:05 p.m.