GetAdminMapLayers (POST | GET)

This action route returns all the maplayers which are accessible by the current user and all admin data of those layers. This is needed when layers are created and updated by admins.

Parameters

Name Type Description Required?
layer_id int If defined this action route will return info of just that particular layer. **false**
lang String Localization. If no lang parameter is given, backend will default to Finnish. **false**
showEmpty Boolean If parameter is given and it is true, backend will response also empty "folders". **false**

Response

Success

{
  "layers": [
    {
      // layer data
      // + admin related layer data
    }
  ]
}

Error

Returns HTTP code 500 with an error message as a JSON in response body. {"error":"Couldn't request DB service - get map layers"} {"error":"Map layer listing failed - get map layers"}

Examples

Example query for Paikkatietoikkuna

(POST|GET) http://demo.paikkatietoikkuna.fi/web/fi/kartta?p_p_id=Portti2Map_WAR_portti2mapportlet&p_p_lifecycle=2&action_route=GetAdminMapLayers&lang=fi

Response:

Example curl request

{
  "layers": [
    {
      // layer data
      // + admin related layer data
    }
  ]
}

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