/layer/themes/graduated
The layer theme module exports a method for graduated themes.
- Source
Methods
(inner) graduated(theme, feature)
The graduated theme method iterates through the ordered categories array and compares a numeric feature field value with the category. The iteration will break if the field value exceeds the category value.
Parameters:
PropertiesName | Type | Description |
---|---|---|
theme | Object | The theme configuration object. |
feature | Object | The feature object. |
Name | Type | Attributes | Description |
---|---|---|---|
theme.field | string | The field name used for determining the category. | |
theme.categories | Array | An array of category objects. | |
theme.graduated_breaks | string | The comparison operator ("less" or "more"). | |
feature.properties | Object | The properties of the feature. | |
properties.features | Array | <optional> | An array of sub-features. |
- Source