- Print
- DarkLight
- PDF
KeyCom can use and display external WFS service data through the WFS interface.
WFS Service
The URL to the WFS service, e.g., http://myserver.com/geoserver/service/wfs
Version: WFS protocol version. The current recommendation is WFS v_1.1_.
Capabilities xml: collection of WFS features in XML format. This must be compiled manually by combining the service address and a search string, for example, http://myserver.com/geoserver/service/wfs?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetCapabilities.
Options: Currently, an empty JSON collection: {}
WFS Resource
Name: a user-friendly name for the WFS metaresource
Form: a description of the form fields (see Configuring the WFS resource form).
Options: options related to searching and displaying WFS data
- id_attr: the name of the id field
- geometry_attr: the name of the location field
- item_label_format: label format according to Python’s format specification
- attributes: a list of the fields to be retrieved. May include localization.
Service: the WFS service being used (see WFS interface).
Typename: the field name offered by the selected WFS service
Description xml: a description of WFS features in XML format. This must be compiled manually by combining the service address and a search string, for example, http://myserver.com/geoserver/service/wfs?SERVICE=wfs&VERSION=1.1.0&REQUEST=describefeaturetype&TYPENAME=typename
Note that the TYPENAME parameter must be the same as the Typename configured above
ID:
Configuring the WFS resource form
The form must be configured in the JSON format.
{
// Form title as visible to the user
"title": {
"fi": "Kaapelit",
"en": "Cables"
},
// The form fields to which the WFS feature data is mapped
// NOTE: This is optional for WFS resources. All data can be retrieved with the "attributes" option
items: [
{
// Field type
"type":"textfield",
// Data attribute (column) name.
// Must be one of the columns stored in options
"name": "id",
// Field label with localization prefixes
"label":{
"fi":"ID",
"en":"ID"
}
},
// ...
],
"view": {
"toolbar": {
// Navigation form toolbar buttons
"buttons": [
"search",
"clear"
]
}
]