Geofencing Extension API Developer's Guide

Check if the Asset's Position Is Inside the Geofences

User Story

The user wants to check in which geofence polygons an asset resides, and how far away it is from the polygons.

Request

The code below shows an actual request matching the user story. The proximity query parameter represents the asset's GPS position latitude and longitude in WGS 84 degree.

https://gfe.cit.api.here.com/2/search/proximity.json
?layer_ids=4711
&app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&proximity=50.0,8.0,500
&key_attribute=POSTCODE

Response

The response to the request contains information about each geometry that either comprises the asset position or is not more than the given search radius away from the asset position:
{
  "errors":[],
  "warnings":[],
  "requestId":"469b08f3-2838-49d3-912d-4adf81d6e93c",
  "geometries":[
    {
      "distance":655.66,
      "nearestLat":50.0,
      "nearestLon":8.0,
      "attributes":
        {
          "POSTCODE":"2009",
          "ADMIN4":"Sydney",
          ...
        }
    },
    {
      "distance":-99999999,
      "nearestLat":50.1,
      "nearestLon":8.1,
      "attributes":
        {
          "POSTCODE":"2000",
          "ADMIN4":"Sydney",
          ...
        }
    }
  ],
  "onError":false
}

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.