Skip to main content

Layers


Under the menu item Themes, new layers can be persisted for the applications, e.g. from external WMS or the project's own GeoServer; you can also import your own raster or vector data. In addition, various settings can be made for each layer.

admin-client

Existing topics can be changed by clicking on the corresponding line in the topic list. To add a new layer, click on the "Create theme" button.

Raster or vector data can be imported using the "Upload theme" button.

As soon as a theme has been changed, it can be saved using the "Save theme" button.

Unsaved changes can be cancelled using the "Reset theme" button.

When creating/editing a topic, the Data source field must be filled in in addition to the name and type (can be selected from the suggestion list).

Configuration

This field saves the configuration for the respective theme in JSON format and could look like this:

{
"hoverable": true,
"featureInfoFormConfig": [
{
"title": "Basis",
"children": [
{
"propertyName": "name",
"displayName": "Name",
"fieldProps": {
"className": "my-field"
}
},
{
"propertyName": "description",
"displayName": "Description",
"fieldProps": {
"className": "my-field"
}
}
]
},
{
"title": "Adresse",
"children": [
{
"propertyName": "adresse",
"displayName": "Adresse",
"fieldProps": {
"className": "my-field"
}
}
]
}
]
}

This is a complete list of the parameters that can be edited:

KeyDescriptionExampleRequired
crossOriginSet this value to 'anonymous' if you encounter problems when querying a layer in the Web GIS application. Normally you do not want to overwrite this value.'anonymous'false
downloadConfigList of download configurations. If set, a new menu item appears within the layer tree for downloading the layerhttps://example.com/geoserver/SHOGUN/ows?service=WFS&version=1.0.0&request=GetFeature&outputFormat=application%2Fjsonfalse
downloadConfig -> downloadUrlURL that enables the layer data to be downloadeds.o.false
downloadConfig -> formatNameThe displayed format name for the specified DownloadUrl. If it is not specified, it is set to "XML".'GeoJSON'false
hoverableDetermines whether map features can be queried with the FeatureInfo tool.truefalse
maxResolutionThe maximum resolution of the layer (up to which resolution/zoom level the layer should be visible)100000false
minResolutionThe minimum resolution of the layer (at which resolution/zoom level the layer should be visible)10000false
opacityDefines the initial opacity for the layer in a range of 0-1.0.5false
propertyConfigNot currently in usefalse
searchableNot currently in usefalse
searchConfigNot currently in usefalse
searchableDetermines whether the layer is searchablefalse
searchConfigDetermines which attributes are searchable during the searchfalse
displayTemplateDefines the display template for the search resultsName: <b>{name}</b>, Adresse: <em>{adresse}</em>false
featureInfoFormConfigDetermines which attributes are displayed in the FeatureInfo display, further details can be found hereherefalse
editableDetermines whether the layer is editable, only applies to internal GeoServer layers that can be written via WFS-Ttruefalse
editFormConfigDetermines which attributes are displayed in the editing form, further details can be found hereherefalse

featureInfoFormConfig

In contrast to the generic display of the attribute data information, you can configure here which attributes of a layer are to be displayed with which labelling. If the featureInfoFormConfig is not configured for a layer, the generic display is used, which displays all attributes of the layer in tabular form as key-value pairs.

The structure of featureInfoFormConfig can look like this:

{
"featureInfoFormConfig": [
{
"title": "Basis",
"children": [
{
"propertyName": "name",
"displayName": "Name",
"fieldProps": {
"className": "my-field"
}
},
{
"propertyName": "description",
"displayName": "Description",
"fieldProps": {
"className": "my-field"
}
}
]
},
{
"title": "Adresse",
"children": [
{
"propertyName": "adresse",
"displayName": "Adresse",
"fieldProps": {
"className": "my-field"
}
}
]
}
]
}

The feature info display can be divided into any number of tabs. These are each defined at the top level by a title and then have any number of child nodes with the individual attributes. The propertyName, which contains the name of the attribute from the service, and the displayName, which contains the desired display name, are assigned to the child nodes. If there are different styles for the field displays, this can be set via the fieldProps.

In the following example, a tab with the title "Adresse" is defined. In this tab, there is an attribute that points to the "adresse" field and should be displayed as "Adresse" in the feature info in the application.

{
"title": "Adresse",
"children": [
{
"propertyName": "adresse",
"displayName": "Adresse",
"fieldProps": {
"className": "my-field"
}
}
]
}

editFormConfig

The editFormConfig can be used to configure an input form for a layer for editing.

The structure of editFormConfig can look like this:

{
"editFormConfig": [
{
"title": "Basis",
"children": [
{
"propertyName": "id",
"displayName": "ID",
"component": "INPUT",
"readOnly": true
}
{
"propertyName": "name",
"displayName": "Name",
"component": "INPUT",
"required": true
},
{
"propertyName": "typ",
"displayName": "Typ",
"fieldProps": {
"options": [
{
"label": "Option 1",
"value": "option1"
},
{
"label": "Option 2",
"value": "option2"
}
]
},
"component": "SELECT",
"required": true
},
{
"propertyName": "jahr",
"displayName": "Jahr",
"component": "NUMBER",
"required": false
},
{
"propertyName": "text",
"displayName": "Text",
"component": "TEXTAREA",
"required": false
},
{
"propertyName": "active",
"displayName": "Aktiv",
"component": "CHECKBOX",
"required": false
}
]
},
{
"title": "Adresse",
"children": [
{
"propertyName": "adresse",
"displayName": "Adresse",
"component": "INPUT",
"required": true
}
]
}
],
}

The editing form can be divided into any number of tabs. These are each defined at the top level by a title and then have any number of child nodes with the individual attributes. The propertyName, which contains the name of the attribute from the layer, and the displayName, which contains the desired display name, are assigned to the child nodes. This is analogous to featureInfoFormConfig.

Additional configuration parameters can also be set.

{
"propertyName": "id",
"displayName": "ID",
"component": "INPUT",
"readOnly": false,
"required": true
}

required is optional and specifies whether the attribute must be filled in or can be filled in optionally. The default for this parameter is false.

readOnly is optional and specifies whether the attribute can be edited. If “readOnly”: true, the attribute cannot be edited.

The output type can be specified using component. All types have the same structure.

The exception is “SELECT”, which must be supplemented by “fieldProps”, which contains the options that should be available to the user in the selection list.

There are a total of 8 output types, which are described here:

KeyDescription
CHECKBOXA checkbox is displayed in which a checkmark can be placed
DATEA date can be entered via a date picker
INPUTA text can be entered in a normal text field
NUMBERNumbers can be entered
SELECTDropdown menu. If this type is selected, a drop-down menu appears, which must be configured with “fieldProps” as in the example above
SWITCHSwitch for switching between true/false
TEXTAREACan be used for longer texts
UPLOADOffers the option to upload for the defined upload fields
REFERENCE_TABLEProvides a configuration option for 1:n attributes

Datasource

This field defines the source of the topic in JSON format. The data structure differs depending on the type of layer:

{
"url": "/geoserver/ows?",
"layerNames": "SHOGUN:airports",
"useBearerToken": true
}
{
"url": "https://ows.terrestris.de/osm-gray/service?",
"layerNames": "OSM-WMS",
"attribution": "&copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap contributors</a>",
"useBearerToken": false
}

This is a complete list of the parameters that can be set:

KeyDescriptionExampleRequired
urlThe base URL of the layer/geoserver/ows?true
layerNamesA comma-separated list of the layers to be requested'SHOGUN:airports'true
attributionThe copyright notice to be displayed for this layer. It is displayed in the bottom corner of the map&copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap contributors</a>false
useBearerTokenWhether or not the (internal) Keycloak Bearer Token should be sent together with the map requests. Must be set to 'true' if a protected layer is requested from the internal GeoServer.truefalse
legendUrlA URL to a user-defined legend image that is displayed in the layertreehttps://ows.terrestris.de/ows/my-legend.pngfalse
matrixSetIdentifier of the Tile Matrix Set that determines the CRS in which the layer is to be exposed. Must be one of the listed tile matrices for the layers: see here for details: https://gdal.org/drivers/raster/wmts.html'WEBMERCATOR'false
requestParamsQuery parameters that are passed to the map server when a layer is queried, e.g. via GetMap. This can be useful if you want to pass server-specific parameters'{"transparent": true}'false
resolutionsThe list of resolutions for which the layer is to be requested'[2445.9849047851562, 1222.9924523925781, 611.4962261962891]'false
tileOriginOrigin of the tile grid. Normally you do not want to define your own valuefalse
tileSizeDefines the tile size. Default is 256512false