layerlist
A layer listing functionality for the geoportal.
Description
Includes listing layers registered in the Oskari instance, hierarchical grouping defined by admin, listing by data provider and listing for layers that are currently on the map. Also includes textual search for layers and pre-defined filters that allow users to find specific type of layers more easily.
Allows other bundles to register pre-defined filters to be shown and adding tools for layers and a hook for admin functionality for adding layers, groups and dataproviders (extensible menu).
Bundle configuration
No configuration is required, but allows configuration:
- layerGroupToggleLimit (optional number, default 0)
0 = don't show layer toggle for groups negative number = alwaus show layer toggle for groups positive number = show layer toggle for groups with at most the amount of layers configured with this
Bundle state
No state is required.
Requests the bundle sends out
Request | Where/why it's used | |
---|---|---|
`MapModulePlugin.MapLayerVisibilityRequest` | Sends out when user clicks the 'Show/Hide' link on a layer | |
`RemoveMapLayerRequest` | Sends out when user clicks the 'remove map layer' button | |
`ChangeMapLayerStyleRequest` | Sent when a layer style is selected from the dropdown. | |
`ChangeMapLayerOpacityRequest` | Sends out when user changes the opacity for a layer | |
`MapModulePlugin.MapMoveByLayerContentRequest` | Allows the user to move the map by the layer content | |
`userinterface.UpdateExtensionRequest` | Handles flyout hide/show | |
`userinterface.AddExtensionRequest` | Register as part of the UI in start()-method | td>|
`userinterface.RemoveExtensionRequest` | Unregister from the UI in stop()-method | |
`Guidedtour.AddToGuidedTourRequest` | Register layerlist to guided tour | |
`catalogue.ShowMetadataRequest` | Sent when the the info icon is clicked | |
`ShowMapLayerInfoRequest` | Sent when the the backend status icon is clicked | |
`RearrangeSelectedMapLayerRequest` | Sends out when user changes the order of layers in the list |
Events the bundle listens to
Event | Why/when |
---|---|
`AfterMapLayerRemoveEvent` | Updates UI to remove the layer from selected layers |
`AfterMapLayerAddEvent` | Updates UI to add the layer to selected layers |
`MapLayerEvent` | Adds/updates/removes layer from listing based on event |
`BackendStatus.BackendStatusChangedEvent` | Updates UI to reflect changes in layer backend status |
`userinterface.ExtensionUpdatedEvent` | React flyout updates |
`MapLayerVisibilityChangedEvent` | Update UI to change the layer visibility status |
`AfterChangeMapLayerOpacityEvent` | Changes map layer opacity slider values |
`AfterChangeMapLayerStyleEvent` | Changes map layer style |
`AfterRearrangeSelectedMapLayerEvent` | Changes map layer order |
`MapSizeChangedEvent` | Handles flyout max height |