plus-.Ol.Map: +.Ol.Map

+.Ol.MapR Documentation

+.Ol.Map

Description

Add components to a OpenLayers Map.

Usage

## S3 method for class 'Ol.Map'
ol.map.obj + other.obj

Arguments

ol.map.obj

S3 object of class Ol.Map.

other.obj

A map layer or scale component.

Details

Similar to the ggplot2 package, + provides functionality to add layers to an existing OpenLayers Map object. Layers are simply appended to the Ol.Map objects layers list. When adding scales, this method searches through map layers in reverse order for scales with matching aesthetics. When a matching scale is found, it is updated according to the parameters of the added scale. In general, continuous scales can be coerced into discrete scales.

Value

Ol.Map object with updated layers or scales.

What can you add?

You can add the following types of objects:

  • A layer object generated by one of the ol_geom_* layer functions.

  • A scale object generated by one of the ol_scale_* functions.

See Also

ol_map

Examples

mymap <- ol_map()
base.layer <- lightgray()
mymap <- mymap + base.layer
## Not run: 
ol_map2HTML(mymap,"SanDiego.html")
browseURL("SanDiego.html")

## End(Not run)

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