Geovisualization Developer's Guide

Shapes

The shapes response body is a JSON object returned by the Geovisualization REST API in response to a request for a shape schema.

Table 1. Shapes Response Elements
Element Data Type Description
code Integer 200
crs Object Name of the projection coordinate reference system used:
  • "type": "EPSG",
  • "properties": {
    • "code": "4326" }
kind String Type of response: the value is datalens#shapes when the request is successful
features Array Each shape contains the following elements:
  • geometry – the type of shape and all coordinate points
  • properties:
    • admin_lev – the admin level of the shape (currently only "Country" is supported)
    • iso3 – ISO 3166-3 alpha-3 code
    • navteq_id – unique identifier
    • name – the name of the shape
  • type"Feature"
  • id – unique identifier
  • geometry_name"geom"
totalFeatures Integer The total number of features in the shape
type String "FeatureCollection"

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

{
  "kind": "datalens#shapes",
  "code": 200,
  "crs": {
    "type": "EPSG",
    "properties": {
      "code": "4326"
    }
  },
  "features": [{
    "geometry": { ... },
    "properties": {
      "admin_lev": "Country",
      "iso3": "KOS",
      "navteq_id": 23830452,
      "name": "Kosovo"
    },
    "type": "Feature",
    "id": "here_country.fid--46c19ef0_15093912434_-6646",
    "geometry_name": "geom"
  }, { ... }
  ],
  "totalFeatures": 238,
  "type": "FeatureCollection"
}