Description Usage Arguments Value Note Examples
Style methods to create style objects corresponding to openlayers style classes.
1 2 3 4 5 6 7 8 9 10 11 12 | stroke_style(color = "green", width = 2)
fill_style(color = "rgba(0, 0, 255, 0.5)")
circle_style(stroke = stroke_style(), fill = fill_style(), radius = 10)
icon_style(src = NULL, anchor = c(0.5, 0.8), icon_color = NULL)
marker_style(src = NULL, anchor = c(0.5, 0.8), icon_color = NULL)
text_style(text = NULL, property = NULL, scale = 1.5, color = "black",
stroke = NULL, offset_xy = c(0, 0))
|
color |
stroke or fill color |
width |
stroke width in pixels |
stroke |
stroke style or |
fill |
fill style or |
radius |
radius in pixels |
src |
url of the icon, base64 encoded icon (see |
anchor |
center of the icon relative to its top left corner |
icon_color |
color to tint the icon or |
text |
text content, ignored in case |
property |
feature property used as text content |
scale |
text scale |
offset_xy |
horizontal and vertical text offset in pixel, positive offsets will shift the text right and down |
style object
color
, icon_color
, radius
and text
can be single values applied to all features
or vectors of length equal to the number of features
1 2 3 | style <- stroke_style() + fill_style()
point_style <- circle_style(stroke_style(color = "blue"), fill = NULL)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.