Skip to main content

HERE Positioning

HERE builds mapping and data tools for enterprises. HERE's Positioning API brings high-precision location awareness to apps and devices, even in challenging outdoor environments. The API can easily be accessed via Pipelines using the webhook transformer.

The following example demonstrates using the HERE Positioning API to translate CBOR Wi-Fi access point data from a device network scan into a position for the device. The resolved position is delivered to LightDB Stream as a JSON payload.

Example network scan data:

CBOR data displayed as JSON for documentation purposes only.

{
"wlan": [
{
"mac": "00:18:39:59:8C:53",
"rss": -87
},
{
"mac": "00:21:55:61:F3:0A",
"rss": -86
},
{
"mac": "00:11:5C:6B:9A:00",
"rss": -71
}
]
}

Example position result:

{
"location": {
"accuracy": 13,
"lat": 61.4469261,
"lng": 23.86456411
}
}
Reminder

Make sure to create a secret named HERE_URL with the appropriate API key credentials.

filter:
path: "/netinfo"
content_type: application/cbor
steps:
- name: convert
transformer:
type: cbor-to-json
- name: get-location
transformer:
type: webhook
parameters:
url: $HERE_URL
- name: send-lightdb
destination:
type: lightdb-stream
version: v1