ui/locations/entries/layer
The entries layer module exports the default layer method.
Methods
(async, inner) decorateLayer(entry)
The infoj layer entry provided as argument will be decorated to become a mapp layer.
Name | Type | Description |
---|---|---|
entry | infoj-entry | type:layer entry. |
(inner) hideLayer()
A custom hide [layer] method bound to the [layer] entry which will not update the mapp.hooks.
(inner) layer(entry) → {HTMLElement}
The layer entry method attempts to lookup a layer from the locale and will spread the infoj-entry object into a structured clone of the locale layer.
The infoj-entry effectively becomes a JSON layer which will be decorated and add the mapview.
The layer.key is a concatenated from the entry.layer [key] and the entry.location.hook.
A layer.view will be created for the decorated layer and appended to the entry.node for the location view.
Name | Type | Description |
---|---|---|
entry | infoj-entry | type:layer entry. |
Name | Type | Attributes | Description |
---|---|---|---|
entry.layer | string | <optional> | lookup layer key for locale.layers[]. |
Node element to hold the layer view drawer.
- Type:
- HTMLElement
(async, inner) showLayer()
A custom show [layer] method bound to the [layer] entry which will not update the mapp.hooks.
The showLayer method assigns the entry value as data property. A query will be executed to populate the data property otherwise. The entry will be disabled if the query does not return a response.
The features may be defined as an featureSet in which case the features whose ID is not in the featureSet will not be styled by the featureStyle method.
An array feature object can be assigned to featureLookup property. Feature properties found by their ID in the featureLookup array will be assigned to the feature.properties in the featureStyle method.