+.Ol.Map | R Documentation |
Add components to a OpenLayers Map.
## S3 method for class 'Ol.Map' ol.map.obj + other.obj
ol.map.obj |
S3 object of class |
other.obj |
A map layer or scale component. |
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.
Ol.Map object with updated layers or scales.
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.
ol_map
mymap <- ol_map() base.layer <- lightgray() mymap <- mymap + base.layer ## Not run: ol_map2HTML(mymap,"SanDiego.html") browseURL("SanDiego.html") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.