Get started - HERE developer portal

This section outlines how to get started quickly using the HERE Geofencing API on the HERE developer portal.

  1. Get a HERE account
  2. Register your app
  3. Get an API key
  4. Send a request

Note

For more detailed information on HERE account setup, app registration, and authentication, see the Identity & Access Management Developer's Guide.

Get a HERE account

If you are an individual developer who has signed up for one of the plans listed on our Developer plans page on developer.here.com. to create applications. Applications (uniquely identified by an app ID) enable development with HERE products and services.

Register your app

To register your app, follow these steps:

  1. Sign in to developer.here.com.
  2. Click your name, select Projects, and then choose your project from the list. Your project details and available application credentials are then displayed.
  3. Select JavaScript or REST and click Generate App. When your application is created, its app ID is displayed.

Get an API key

To get an API key, follow these steps:

  1. Sign in to developer.here.com.
  2. Click your name, select Projects, and then choose your project from the list. Your project details and available application credentials are then displayed.
  3. Click Create API key to generate a maximum of two API keys for your application. The API key is created and displayed.

Send a request

View the following example to send a request.

Sample request: Test geocoordinates

To test whether a set of geocoordinates are within a set of geoshapes available to the HERE Geofencing API, send the following GET request.

https://fleet.ls.hereapi.com/2/search/proximity.json
?apiKey=\{YOUR\_API\_KEY\}
&layer_ids=123
&key_attribute=NAME
&proximity=52.52144,13.41265

Note: This example uses a HERE API Key to authenticate your request. For the available authentication options, see the Identity & Access Management Developer Guide.

Note: The above example assumes you have uploaded the following shape file to the service.

ID    NAME        ABBR    WKT

1    Alexanderplatz    AL    POLYGON((13.41252 52.52228,13.41426 52.5221,13.41522 52.52113,13.41227 52.51981,13.41252 52.52228))

The response to the above request includes the following high level elements:

  • List of geoshapes (called geometries in the response) with the distance between the geocoordinate and the closest border of the geofence (a negative value indicates the position is inside, a positive value outside of the indicated shape).
  • Metadata about the request
{
  "geometries": [
    {
      "attributes": {
        "ID": "1",
        "GEOMETRY_ID": "0",
        "NAME": "Alexanderplatz",
        "ABBR": "AL"
      },
      "distance": -99999999,
      "nearestLat": 0,
      "nearestLon": 0,
      "geometry": "MULTIPOLYGON(((13.41252 52.52228,13.41426 52.5221,13.41522 52.52113,13.41227 52.51981,13.41252 52.52228)))"
    }
  ],
  "response_code": "200 OK"
}

results matching ""

    No results matching ""