/layer/featureStyle
This module exports a style function for a layer
- Source
Methods
(inner) Style()
Style functions process [vector] features and return an OL style to the layer render.
- Source
(inner) clusterStyle(feature)
Applies cluster style to the feature based on layer configuration.
| Name | Type | Description |
|---|---|---|
feature | Object | The feature object. |
- Source
(inner) featureProperties(layer, properties) → {Object}
Assigns feature properties based on layer configuration.
Features not in the layer featureSet, featuresObject, or featureLookup will not be displayed and return null.
| Name | Type | Description |
|---|---|---|
layer | layer | The decorated mapp layer. |
properties | Object | The feature properties. |
| Name | Type | Attributes | Description |
|---|---|---|---|
layer.featureSet | Set | <optional> | A set of feature IDs to be displayed. |
layer.featuresObject | Object | <optional> | MVT feature properties keyed by feature ID. |
layer.featureLookup | Array | <optional> | An array of feature properties objects to be displayed. |
- Source
The feature properties or null if the feature is not displayed.
- Type:
- Object
(inner) featureStyle(layer) → {function}
Returns a style function for OL vector layers.
| Name | Type | Description |
|---|---|---|
layer | layer |
| Name | Type | Attributes | Description |
|---|---|---|---|
layer.style | layer-style | The layer style config. | |
style.cache | Boolean | <optional> | The feature style should be retrieved from the feature 'Styles' property. |
- Source
The style function for the layer.
- Type:
- function
(inner) highlightStyle(feature)
Applies highlight style to the feature based on layer configuration.
| Name | Type | Description |
|---|---|---|
feature | Object | The feature object. |
- Source
(inner) iconScalingStyle(feature)
Applies the icon scale based on the value of the field supplied in layer.style.icon_scaling.field
| Name | Type | Description |
|---|---|---|
feature | Object | The feature object. |
- Source
(inner) labelStyle(feature)
Applies label style to the feature based on layer configuration.
| Name | Type | Description |
|---|---|---|
feature | Object | The feature object. |
- Source
(inner) selectedStyle(feature)
Applies selected style to the feature based on layer configuration.
| Name | Type | Description |
|---|---|---|
feature | Object | The feature object. |
- Source