Quick start

This section explains how to quickly get started using the .

  1. Get a HERE account
  2. Create a project
  3. Get an API key
  4. Send a request
  5. Next steps

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

A HERE account provides you with access to the HERE services you have licensed, whether you are a HERE platform user or a developer portal user.

Create a project

To create a project, follow these steps:

  1. Sign in to the HERE platform using your HERE account.
  2. Open the Projects Manager from the launcher.
  3. Click Create new project.
  4. Enter a name for the project. Project names don't have to be unique.
  5. Enter a project ID. Project IDs must be unique within an organization and cannot be changed for the lifetime of the organization. Project IDs must be between 4 and 16 characters in length.
  6. Optional: Enter an optional description.
  7. Click Save.
  8. On the Resources tab, select Services and then click Link a Service.
  9. Search for the HERE Geofencing API v8 service and click Link.
  10. Click Done.

Get an API key

To get an API key, follow these steps:

  1. Sign in to the HERE platform using your HERE account.
  2. Select the Access Manager from the launcher.
  3. Select the Apps tab and click Register new app.
  4. Enter a name for the app.
  5. Optional: Enter a description for the app.
  6. Optional: Select the project you created in the previous procedure from the Default access to a project field.
  7. Click Register. The HERE platform creates a new app with a unique app ID.
  8. On the Credentials tab, select API Keys and then click Create API key to generate a maximum of two API Keys for your application authentication credentials. 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://geofencing.hereapi.com/v8/geofence
?apiKey=\{YOUR\_API\_KEY\}
&layer_ids=123
&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"
}

Next steps

To learn how to construct a request, see Constructing a request. For a sample request, see Search/proximity. For further examples, see Examples. To understand a HERE Geofencing API response, see Reading a HERE Geofencing API response. For the terms and conditions covering this documentation, see the HERE Documentation License.

results matching ""

    No results matching ""