GetMapLayers (GET)

This action route returns all the maplayers which are accessible by the current user. Layer selector flyout (i.e. flyout in layerselector2 bundle) is created using this data.

Parameters

Name Type Description Required?
lang String Localization. If no lang parameter is given, backend will default to Finnish. **false**

Response

Success

{
  "layers": [
    {
    // layer data
    }
  ]
}

Error

Returns HTTP code 200 with an error message as a string in response body.

Examples

Example query for Paikkatietoikkuna

http://www.paikkatietoikkuna.fi/web/fi/kartta?p_p_id=Portti2Map_WAR_portti2mapportlet&p_p_lifecycle=2&action_route=GetMapLayers&lang=fi

Response:

{
  "layers": [
    {
      "wmsName": "Metla:maaluokka_0610",
      "geom": "POLYGON ((78064.52367509116 6629266.014941297, 757427.0804893243 6629266.014941297, 757427.0804893243 7793583.912125537, 78064.52367509116 7793583.912125537, 78064.52367509116 6629266.014941297))",
      "type": "wmslayer",
      "baseLayerId": 37,
      "legendImage": "http://kartta.metla.fi:80/geoserver/ows?service=WMS&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=maaluokka_0610",
      "formats": {
        "value": "text/html"
      },
      "id": 278,
      "style": "",
      "dataUrl": "/catalogue/ui/metadata.html?uuid=2e5565ff-f17f-42a5-9435-d6353f2db46f",
      "created": "Mon Nov 05 10:59:30 EET 2012",
      "updated": "Fri Nov 16 10:01:19 EET 2012",
      "name": "Maaluokka 2009 (1-3)",
      "opacity": 100,
      "permissions": {
        "publish": "no_publication_permission"
      },
      "maxScale": 1,
      "inspire": "Maanpeite",
      "dataUrl_uuid": "2e5565ff-f17f-42a5-9435-d6353f2db46f",
      "styles": {
        "title": "Maaluokka",
        "legend": "http://kartta.metla.fi:80/geoserver/ows?service=WMS&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=maaluokka_0610",
        "name": "maaluokka_0610"
      },
      "descriptionLink": "",
      "orgName": "Metsäntutkimuslaitos",
      "isQueryable": false,
      "minScale": 1.5E7,
      "wmsUrl": "http://kartta.metla.fi/geoserver/ows?",
      "admin": {
        
      },
      "orderNumber": 1,
      "subtitle": ""
    }
    //, etc.
  ]
}

Last modified: Fri Mar 15 2024 14:11:33 GMT+0200 (Eastern European Standard Time)