/layer/themes/categorized
The layer theme module exports a method for categorized themes.
Methods
(inner) categorized(theme, feature)
The categorized theme method will assign a style from category matching the features properties.
Cluster features may not be styled by a categorized theme.
A theme can have a fields array to apply an icon style array for the individual property fields.
Parameters:
PropertiesName | Type | Description |
---|---|---|
theme | Object | The theme configuration object. |
feature | Object | The feature object. |
Name | Type | Attributes | Description |
---|---|---|---|
theme.categories | Array | ||
theme.field | string | <optional> | The feature property field to theme. |
theme.fields | array | <optional> | A fields array to style multiple feature properties. |
feature.properties | Object | ||
properties.features | Array | <optional> | A cluster feature will have a features array property. |