step_expr {mapgl} | R Documentation |
Create a step expression
Description
This function generates a step expression that can be used in your styles.
Usage
step_expr(column = NULL, property = NULL, base, values, stops, na_color = NULL)
Arguments
column |
The name of the column to use for the step expression. If specified, |
property |
The name of the property to use for the step expression. If specified, |
base |
The base value to use for the step expression. |
values |
A numeric vector of values at which steps occur. |
stops |
A vector of corresponding stops (colors, sizes, etc.) for the steps. |
na_color |
The color to use for missing values. Mapbox GL JS defaults to black if this is not supplied. |
Value
A list representing the step expression.
Examples
step_expr(
column = "value",
base = "#ffffff",
values = c(1000, 5000, 10000),
stops = c("#ff0000", "#00ff00", "#0000ff")
)
[Package mapgl version 0.3.2 Index]