Application

List layer types

GET /maps_api/v2/server/layer_types

This call will return a list of valid layer types with translated layer labels.

Example request:

GET /maps_api/v2/server/layer_types HTTP/1.1
Host: planviewer.nl
Accept: application/json

Example response:

{
    "types": {
        "empty": "Leeg (Witte achtergrond)",
        "osm": "OSM (OpenStreetMap)",
        "aerial": "Luchtfoto",
        "dkk": "Kadastrale kaart perceelsgrenzen",
        "dkk_vector": "Kadastrale kaart perceelsgrenzen als vector",
        "bag": "BAG (Basisregistraties Adressen en Gebouwen)",
        "bag_vector": "BAG (Basisregistraties Adressen en Gebouwen) als vector",
        "imro": "Ruimtelijke plannen",
        "outline": "Dossiergrens",
        "proxy": "Laag van andere viewer",
        "wms": "WMS (Web Map Service)",
        "wfs": "WFS (Web Feature Service)",
        "vector": "Vectorlaag (Data-upload en\/of zelf tekenen)"
    },
    "locale": "nl"
}

List vector source types

GET /maps_api/v2/server/vector_source_types

This call will return a list of valid vector source layer types with translated type labels.

Example request:

GET /maps_api/v2/server/vector_source_types HTTP/1.1
Host: planviewer.nl
Accept: application/json

Example response:

{
    "types": {
        "polygon": "Polygonen",
        "line": "Lijnen",
        "point": "Punten"
    },
    "locale": "nl"
}

List feature export types

GET /maps_api/v2/server/feature_export_types

This call will return a list of possible file formats for exporting features, they will have translated format labels as values.

Example request:

GET /maps_api/v2/server/feature_export_types HTTP/1.1
Host: planviewer.nl
Accept: application/json

Example response:

{
    "types": {
        "csv": "CSV",
        "geojson": "GeoJSON",
        "gml": "GML (XML)"
    },
    "locale": "nl"
}

List image export types

GET /maps_api/v2/server/image_export_types

This call will return a list of possible image formats for generating a snapshot, they will have translated format labels as values.

Example request:

GET /maps_api/v2/server/image_export_types HTTP/1.1
Host: planviewer.nl
Accept: application/json

Example response:

{
    "types": {
        "png": "PNG",
        "jpg": "JPG"
    },
    "locale": "nl"
}

List field mapping types

GET /maps_api/v2/server/mapping_types

This call will return a list of possible mapping types with translations.

Example request:

GET /maps_api/v2/server/mapping_types HTTP/1.1
Host: planviewer.nl
Accept: application/json

Example response:

{
    "types": {
        "string": "Tekst",
        "loose_enum": "Keuze"
    },
    "locale": "nl"
}

Upload the application SLD

POST /maps_api/v2/server/sld/upload

Upload a new SLD at application level. You may either use a JSON structure for the body, or use a request with a multipart/form-data body.

Request JSON Object:
 
  • file – The file should be uploaded using the file property.

Example JSON request:

POST /maps_api/v2/server/sld/upload HTTP/1.1
Host: planviewer.nl
Accept: application/json
Content-Type: application/json

{
    "file": {
        "name": "example.sld",
        "content": "Base64-encoded content"
    }
}

Example form request:

POST /maps_api/v2/server/sld/upload HTTP/1.1
Host: planviewer.nl
Accept: application/json
Content-Type: multipart/form-data; boundary=--BOUNDARY--

--BOUNDARY--
Content-Disposition: form-data; name="file"; filename="example.sld"

[example.sld content]
--BOUNDARY--

Example response:

{
    "error": false
}

Delete the application SLD

DELETE /maps_api/v2/server/sld/delete

Delete the application level SLD if one exists.

Example request:

DELETE /maps_api/v2/server/sld/delete HTTP/1.1
Host: planviewer.nl
Accept: application/json

Example response:

{
    "error": false
}

Check if an application SLD exists

GET /maps_api/v2/server/sld

Returns if an application level SLD exists.

Example request:

GET /maps_api/v2/server/sld HTTP/1.1
Host: planviewer.nl
Accept: application/json

Example response:

{
    "error": false,
    "sld": true
}

Get default map legend

GET /maps_api/v2/server/legenda/default

Returns a json object containing icons and naming for use in building up your default map legend.

GET /maps_api/v2/server/legenda/default HTTP/1.1
Host: planviewer.nl
Accept: application/json

Example response:

{
    "bestemmingsplangebied": {
    0: {
        "name":"Bestemmingsplangebied",
        "icon":"data:image/png;base64,...",
        "image":"data:image/png;base64,...",
        "inline":1
        },
    1: {
        "name":"Bestemmingsplangebied",
        "icon":"data:image/png;base64,...",
        "image":"data:image/png;base64,...",
        "inline":1
        }
    }

}