MyFeatures
Provides tools for managing a user's feature layers and their features.
Description


The bundle loads the logged-in user's MyFeatures layers and makes them available as map layers.
Users can create layers, import data, edit layer metadata and styles, export layers, and add or
edit individual features. When the mydata bundle is available, MyFeatures adds a tab there to
list the user's layers.
The bundle's layer and feature operations use the Oskari-server routes MyFeaturesLayer,
ImportMyFeatures, ExportMyFeaturesLayer, and MyFeaturesFeature.
Bundle configuration
Configuration is optional:
conf: {
maxFileSizeMb: 10
}maxFileSizeMbsets the maximum import file size in megabytes. The default is 10 MB.- The maximum unzipped size for an import is 15 times
maxFileSizeMb.
The bundle loads the user's layers and enables its toolbar tools only when the user is logged in.
Requests the bundle sends out
| Request | Where/why it's used |
|---|---|
| `Toolbar.AddToolButtonRequest` | Adds toolbar buttons for importing/creating a layer and adding a feature, when the request builder is available. The buttons are disabled for guest users. |
| `AddMapLayerRequest` | Adds an imported layer or a layer selected from the MyFeatures list to the map. |
| `MapModulePlugin.MapLayerUpdateRequest` | Refreshes a layer on the map after its features or layer settings change. |
| `ChangeMapLayerStyleRequest` | Applies the updated style to a selected layer after its settings change. |
| `RemoveMapLayerRequest` | Removes a deleted layer from the map. |
| `InfoBox.HideInfoBoxRequest` | Closes the feature deletion confirmation from the infobox when deletion is confirmed. |
Events the bundle listens to
| Event | How does the bundle react |
|---|---|
| `MapLayerEvent` | Refreshes the MyFeatures layer list when a layer is added, updated, or removed. |
Dependencies
| Dependency | Linked from | Purpose |
|---|---|---|
| `MapLayerService` | Oskari sandbox | Registers and manages MyFeatures map layers. |
| WFS layer plugin | Main map module | Handles the MyFeatures layer type on the map. |
| `mydata` | Oskari sandbox (optional) | Provides the tab in which the user's MyFeatures layers are listed. |