GuidesAPI Reference
Guides

How to get indoor floor level coordinates with WLAN

📘

Note

HERE Network Positioning API v1 is in maintenance and is not actively developed. Use HERE Network Positioning API v2 to get the latest features and updates. To learn more, see the HERE Network Positioning API v2 Developer Guide.

User Story

The user wants to determine the WGS-84 compliant coordinates defined by the WLAN information in the POST body together with a floor level information.

Request

The code block below demonstrates a POST request to get the geocoordinates defined by the WLAN information in the POST body.

https://pos.ls.hereapi.com/positioning/v1/locate?required=floor

You need to set the authentication token and the request content type in the HTTP headers:

Authorization: Bearer {YOUR_TOKEN}
Content-Type: application/json

This POST request requires the following POST body.

{
 "wlan": [{
      "mac": "FC-5B-39-B6-71-5C",
      "powrx": -79
    }, {
      "mac": "4C-9E-FF-84-EB-34",
      "powrx": -79
    }, {
      "mac": "62-31-97-7A-AD-4C",
      "powrx": -79
    }, {
      "mac": "04-BF-6D-72-6D-01",
      "powrx": -79 
    }, {
      "mac": "60-31-97-7A-AD-4C",
      "powrx": -79
    }, {
      "mac": "18-64-72-B7-BC-A2",
      "powrx": -79
    }, {
      "mac": "00-3A-7D-D5-95-99",
      "powrx": -79
    }
  ]
}

Response

The response to the request contains:

  • lat: WGS-84 compliant latitude coordinate
  • long: WGS-84 compliant longitude coordinate
  • accuracy: Radius of the uncertainty circle around the position in meters
  • floor: Floor information
  • floor.level: Floor level
  • floor.id: Building Id
  • floor.name: Building Name
{
  "location": {
    "lng": 23.777138,
    "lat": 61.498145,
    "accuracy": 5,
    "floor": {
      "level": 2,
      "id": "DM_8004",
      "name":"Tullintori"
    }
  }
}
  

Related Information