Custom Location Extension API Developer's Guide

Proximity Search for Custom Geometries

User Story

The user wants to search for all locations in the "HERE Stores DE" layer that are within a 0.5 kilometer radius of Frankfurt Central Station (50.113905,8.677608). This is done via a a proximity search.

Request Summary

HTTP method: GET
Resource: proximity.json
Parameters: app_id [app_id={YOUR_APP_ID}]

app_code [app_code={YOUR_APP_CODE}]

proximity [proximity=50.113905,8.677608,500], specifies the circular search area as a center latitude, longitude (in WGS 84 degrees), and radius in meters.

layer_ids [layer_ids=30], specifies the list of layer IDs to be searched; only 1 layer for this example.

Request

The code below shows an actual request matching the user story.

https://cle.cit.api.here.com/2/search/proximity.json
  ?app_id={YOUR_APP_ID}
  &app_code={YOUR_APP_CODE}
  &proximity=50.113905,8.677608,500
  &layer_ids=30

Response

{"geometries": [
  {  "distance":3339.72,
    "attributes": {
      "NODE_ID":"891236772",
      "GEOMETRY_ID":"0"},
    "nearestLat":50.1622,
    "nearestLon":8.53324,
    "geometry":"MULTIPOINT((8.53324 50.1622))"}
  ],
  "response_code":"200 OK"
}