Create your own feature service template files
Create reusable WFS and OGC API Features templates with a text editor, your own tool or AI.
View file, service file or link
A .mtfeature.json file stores one view and can be up to 512 KiB. A .mtservice.json file stores one service with 1 to 16 views and can be up to 1 MiB. Linked layers require a service template. A public HTTPS URL without a query or fragment can serve a .mtfeature.json file and can also be shared by QR.
Online map services → Object layers (OGC API / WFS) → Import template
- Import view template
- Import service template
- Import template link
Fields in a view template
Save plain UTF-8 JSON with the format identifier and version 1 from the example. Copy the HTTPS service address without a query or fragment, protocol, exact layer name, namespace (null if absent) and supported request CRS from a working export. In a service template, each view must use the same endpoint and protocol as the service.
WFS | OGC_API_FEATURES.mtfeature.json · Berlin
{
"format": "maptools-feature-template",
"version": 1,
"name": "Berlin · denkmale:denkmale",
"endpoint": "https://gdi.berlin.de/services/wfs/denkmale",
"protocol": "WFS",
"collection": "denkmale:denkmale",
"namespace": "denkmale",
"requestCrs": "urn:ogc:def:crs:EPSG::4326",
"requiredFields": {},
"area": { "type": "viewport" },
"positionMode": "SOURCE_GEOMETRY"
}
berlin-monuments.mtfeature.json
Optional fields control styling (style), field labels (aliases), query area (area), point position (positionMode), historical period (historical), a stored WFS query (storedQuery) and limited local filtering (allowLocalFallback). In a service template, requestedProperties controls requested attributes, visibleProperties controls displayed attributes and enabled activates the view. The map slot is set separately.
Filters and code catalogues
filter is a string containing JSON. Build the filter object first and serialize it as a string. requiredFields lists the provider's field names and types. In codeListMappings, specify the catalogue URL and matching type, with a namespace where needed. The filter uses the original code, such as the text value “1110”.
filter · requiredFields · codeListMappings
{
"filter": "{\"version\":1,\"predicate\":{\"type\":\"comparison\",\"property\":\"abmarkung_Marke\",\"operator\":\"EQUALS\",\"value\":{\"type\":\"text\",\"value\":\"1110\"}}}",
"requiredFields": {
"abmarkung_Marke": "STRING"
},
"codeListMappings": {
"abmarkung_Marke": {
"url": "https://registry.gdi-de.org/codelist/de.adv-online.gid/AX_Marke/AX_Marke.de.json",
"fieldType": "STRING",
"fieldNamespace": "http://www.adv-online.de/namespaces/adv/gid/7.1"
}
}
}Link geometry and attributes
geometryJoin gets coordinates from up to three other layers of the same service. sourceField refers to the main object. targetField can replace its default object ID. sourcePrefix and reversePrefix strip reference prefixes. Sources marked lookupOnly use reverseField, and at least one source must support spatial search. links adds attributes through up to three rules. A named target field also needs its type. Stored WFS queries cannot be combined with these joins.
.mtservice.json · AX_Grenzpunkt · TA / AU
{
"format": "maptools-feature-service-template",
"version": 1,
"name": "ALKIS Hessen",
"endpoint": "https://www.gds.hessen.de/wfs2/aaa-suite/cgi-bin/alkis/sf/wfs",
"protocol": "WFS",
"views": [
{
"view": {
"format": "maptools-feature-template",
"version": 1,
"name": "Grenzpunkte – TA und AU",
"endpoint": "https://www.gds.hessen.de/wfs2/aaa-suite/cgi-bin/alkis/sf/wfs",
"protocol": "WFS",
"collection": "adv:AX_Grenzpunkt",
"namespace": "http://www.adv-online.de/namespaces/adv/gid/7.1",
"requestCrs": "urn:ogc:def:crs:EPSG::4258",
"area": {
"type": "viewport"
}
},
"geometryJoin": {
"sources": [
{
"collection": {
"name": "adv:AX_PunktortTA",
"namespace": "http://www.adv-online.de/namespaces/adv/gid/7.1"
},
"sourceField": "istTeilVon",
"sourcePrefix": "urn:adv:oid:"
},
{
"collection": {
"name": "adv:AX_PunktortAU",
"namespace": "http://www.adv-online.de/namespaces/adv/gid/7.1"
},
"sourceField": "istTeilVon",
"sourcePrefix": "urn:adv:oid:"
}
],
"reverseField": "bestehtAus",
"reversePrefix": "urn:adv:oid:"
}
}
]
}
Create and check a template
Export a working view or service and edit the values you need. Give your tool or AI the export and provider-confirmed names, types and relationships. Open the matching import option and check at least one expected match and one exclusion in the preview. For linked layers, also verify the sources of the coordinates and attributes.
Export template → Export view template
Export template → Export service template
Import view template → Set up source from template
Import service template → Check service and fields
Templates share configuration. Set up access to restricted services separately on the destination device. Keep credentials, API keys, tokens and private headers out of the file. An optionally included area may contain coordinates. An imported view is saved as an independent copy. A service template can reuse identical views already present.