Layer fields translations & filters

It is possible to rename a field or choose not to show the field with it’s value.

For example see the pictures below for renaming the field GRAY_INDEX:

../../../_images/wms_original_props.jpg

Into this:

../../../_images/wms_translated_props.jpg

Filter fields

To prevent certain fields from showing in the information panel, set a layer’s filter_fields property:

Example request:

PATCH /maps_api/v2/server/viewers/(string: identifier)/layers/(int: layer)
{
    "filter_fields": [
        {
            "name": "fid",
            "visible": false
        },
        {
            "name": "objectid",
            "visible": false
        },
        {
            "name": "vhn_new",
            "visible": false
        }
    ]
}

Translations

To give a field a more meaningful name, set a layer’s translations property:

Example request:

PATCH /maps_api/v2/server/viewers/(string: identifier)/layers/(int: layer)
{
    "translations": [
        {
            "name": "naam_n2k",
            "translation": "Naam"
        },
        {
            "name": "shape_leng",
            "translation": "Lengte"
        },
        {
            "name": "shape_area",
            "translation": "Oppervlakte"
        },
    ]
}