Fleet Telematics Custom Locations 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: apiKey [apiKey={YOUR_API_KEY}]

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://fleet.ls.hereapi.com/2/search/proximity.json
?apiKey={YOUR_API_KEY}
&proximity=50.113905,8.677608,500
&layer_ids=30
Note: This example uses a HERE API Key to authenticate your request. For the available authentication options, see the Identity & Access Management Developer Guide.

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"
}