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)", "wmts": "WMTS (Web Map Tile Service)", "wfs": "WFS (Web Feature Service)", "vector": "Vectorlaag (Data-upload en\/of zelf tekenen)", "imrogml": "IMRO GML laag (data-upload)" }, "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-databody.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 } } }
Get wfs Capabilities¶
-
POST/maps_api/v2/server/capabilities/wfs¶ Returns a list of layers from an external wfs service. Those layer names can be used when creating a new layer in mapsAPI, in combination with the given url.
Example JSON request:
POST /maps_api/v2/server/capabilities/wfs HTTP/1.1 Host: planviewer.nl Accept: application/json Content-Type: application/json { "url" : "https://geodata.nationaalgeoregister.nl/ahn3/wfs?request=GetCapabilities&service=WFS&Version=1.1.0" }
Example JSON response:
[ { "title": "ahn3_bladindex", "name": "ahn3:ahn3_bladindex" } ]
Get wms Capabilities¶
-
POST/maps_api/v2/server/capabilities/wms¶ Returns a list of layers from an external wms service. Those layer names can be used when creating a new layer in mapsAPI, in combination with the given url.
Example JSON request:
POST /maps_api/v2/server/capabilities/wms HTTP/1.1 Host: planviewer.nl Accept: application/json Content-Type: application/json { "url" : "https://geodata.nationaalgeoregister.nl/ahn1/wms?request=GetCapabilities&service=WMS&Version=1.3.0" }
Example JSON response:
[ { "title": "ahn1_100", "name": "ahn1_100m" }, { "title": "ahn1_25m", "name": "ahn1_25m" }, { "title": "ahn1_5m", "name": "ahn1_5m" }, { "title": "ahn1_bladindex", "name": "ahn1_bladindex" }, { "title": "puntdichtheidgebieden", "name": "puntdichtheidgebieden" } ]
Get wmts Capabilities¶
-
POST/maps_api/v2/server/capabilities/wmts¶ Returns a list of layers from an external wmts service. Those layer names can be used when creating a new layer in mapsAPI, in combination with the given url.
Example JSON request:
POST /maps_api/v2/server/capabilities/wmts HTTP/1.1 Host: planviewer.nl Accept: application/json Content-Type: application/json { "url" : "https://geodata.nationaalgeoregister.nl/tiles/service/wmts/ahn1?request=GetCapabilitivice=WMTS&Version=1.0.0" }
Example JSON response:
[ "brtachtergrondkaart", "brtachtergrondkaartgrijs", "brtachtergrondkaartpastel", "brtachtergrondkaartwater", "bodemkaart50000", "geomorfologischekaart50000", "top10nlv2", "kadastralekaartv3", ]