Explore Your Location

To query layers for data, send an HTTP GET request to the anchors endpoint. This endpoint is a good way to start using HERE Geoenrichment.

GET https://geoenrichment.api.here.com/v1/layers/{layer_realName}/anchors

There are four parameters that you can use to customize the location to explore:

  • at - The latitude for your location.
  • radius - The maximum radius around the location to explore; optional.
  • limit - The maximum number of entities to return; optional.
  • shapeType - Defines the type of returned entities shape; optional.

Default values for parameters are:

  • radius: 100
  • limit: 10
  • shapeType: FULL

For example, a query to explore a postion with latitude 48.84219 and longitude 2.35733, within 50 meters and limiting the response to a single entity, can be specified as follows:

GET https://geoenrichment.api.here.com/v1/layers/buildings/anchors?
at=51.5007,-0.12459&
limit=1&
radius=50&
apiKey={YOUR_API_KEY}

The response will be similar to:

{
   "layer":{
      "layerId":"6dc6a8f1-72c6-47ab-bbf6-9663d1fb0736",
      "name":"HERE Buildings layer",
      "version":1
   },
   "data":[
      {
         "results":[
            {
               "type":2005300,
               "type_description":"Historical Building/Landmark",
               "name":"Big Ben",
               "geojson":{
                  "type":"MultiPolygon",
                  "coordinates":[
                     [
                        [
                           [
                              -0.124467242619871,
                              51.5006524941886
                           ],
                           [
                              -0.124448142607208,
                              51.5007599941877
                           ],
                           [
                              -0.124612242614429,
                              51.5007726941946
                           ],
                           [
                              -0.124631342627092,
                              51.5006651941955
                           ],
                           [
                              -0.124467242619871,
                              51.5006524941886
                           ]
                        ]
                     ]
                  ]
               },
               "distance":0,
               "address":{
                  "countryCode":"GBR"
               }
            }
         ],
         "request":{  
            "location":{  
               "lat":51.5007,
               "lng":-0.12459
            },
            "datetime":null
         }
      }
   ]
}

The response consists of:

  • layer - Describes the layer that provides the data.
  • data -
    • request - an object with coordinates sent in the request,
    • results - collection containing entities that match the query.

The entities that are returned are described by all available geo-properties. It is not possible to customize the response.

results matching ""

    No results matching ""