-
Notifications
You must be signed in to change notification settings - Fork 20
Layer Editor panel
Filip Leitner edited this page Apr 30, 2024
·
10 revisions
Layer editor is a component in HsLayerManagerModule and is nested under LayerMangerComponent. It lets you edit the currently selected layer from the list provided by layer manager:
- Rename layer
- Set layers dimensions used in WMS, WMTS, XYZ requests through dimension widget.
- Display layers legend using legend widget
- Zoom to layers extent
- Delete layer from map
Several widgets (sub-components) exist to manage/display info about layer and the widget list can be extended using hsLayerEditorWidgetContainerService
.
The widgets provided by hslayers-ng are:
- HsTypeWidgetComponent - Displays layer type and service URL if possible
- HsMetadataWidgetComponent - Displays link to metadata and abstract (description) of layer
- HsLegendWidgetComponent - Legend graphics provided by WMS service, hardcoded URL or generated from OL styles in case of vector layer. Uses HsLegendComponent under the hood.
- HsLayerEditorDimensionsComponent - Specify dimensions in the form of dropdowns for lists or datetime pickers for
time
dimension. - HsOpacityWidgetComponent - Slider to control opacity of the layer
New widgets can be created by extending HsLayerEditorWidgetBaseComponent
class or implementing HsPanelComponent
interface and providing your own html template.
The widget can be added to the DOM by:
import {HsLayerEditorWidgetContainerService} from 'hslayers-ng/components/layer-manager';
...
this.hsLayerEditorWidgetContainerService.create(
HsYourWidgetComponent,
{}
);
Quick Links: Home ➖ App configuration ➖ Layer configuration ➖ Cesium configuration ➖ Composition schema (separate repo)