Geovisualization Developer's Guide

Layers

The layers response body is a JSON object returned by the Geovisualization REST API in response to a request for a list of layer schemas.

Table 1. Layers Response Elements
Element Data Type Description
kind String Type of response: the value is datalens#layers when the request is successful
layers Array Each layer contains the following elements:
  • bbox – the bounding box of the layer, specified by four points where the upper left and bottom right corners of a box are given in WGS-84 compliant geocoordinates
  • capabilities – operations possible using this layer; currently only "georeference" is supported
  • crs – name of the projection coordinate reference system
  • name – name of the layer
  • original_crs – name of the original projection coordinate reference system
  • owner – owner of the layer; determines the layer's accessibility
  • schema – the schema structure of the layer with the following fields:
    • columns:
      • name – name of the shape
      • type – data type of the column
  • title – description of the layer

The code example below illustrates an example response to a successful request.

{
  "kind": "datalens#layers",
  "layers": [{
  "owner": "public",
  "name": "here_country",
  "title": "Here administrative boundaries for countries of the world",
  "capabilities": ["georeference"],
  "original_crs": "EPSG:32630",
  "crs": "EPSG:4326",
  "bbox": "-179.800003051758, 179.800003051758, -56.664665222168, 84.3074798583984",
  "schema": {
    "columns": [{
    "type": "Geometry",
    "name": "geom"
    }, {
    "type": "String",
    "name": "name"
    }, {
    "type": "Integer",
    "name": "navteq_id"
    }, {
    "type": "String",
    "name": "iso3"
    }]
  }
  }, {
  "owner": "HERE-abcdef",
  "name": "c41dc5205b274e3ab89e96ca1e8dc5e7",
  "title": "Some user's custom layer",
  "capabilities": "",
  "original_crs": "EPSG:4326",
  "crs": "EPSG:4326",
  "bbox": "-167.582794189453, 179.255523681641, -29.2892932891846, 71.5051193237305",
  "schema": {
    "columns": [{
    "type": "Geometry",
    "name": "geom"
    }, {
    "type": "String",
    "name": "arbitrary_metadata"
    }]
  }
  ...
  }]
}