GuidesAPI Reference
Guides

How to retrieve geofence geometry

HERE Geofencing API operates on the assumption that your app knows the geometry itself, to display or modify it. Hence, queries only return the ID of each geometry instead of the full geofence geometries, to reduce network traffic and increase the speed of the device and service.

To support a simple display in devices and asset manager centers, the API can optionally return the relevant fragments of the geometry – the part that is within the search radius. However, this may cause excessive load. To manage load efficiently, applications should cache the geometry piece of recently displayed geometries and only resend a query requesting for geometry fragments if:

  • A non-cached geometry ID is returned
  • The asset has moved around a lot since the last cached geometry fragment

Frequency of requests

You can query the HERE Geofencing API as often as needed for geofences around an asset's position. However, to efficiently manage device, network, and service load, your app should use the distances provided by the API to reduce unnecessary requests—particularly when it's unlikely that the asset’s geofencing status has changed significantly since the last query.

For example, if the nearest geofence was 3.5 km away and the asset has only moved 100 meters, it is generally sufficient to query the API less frequently