Prerequisites
- The relevant premises are mapped with Map Creator 2 and maps have been generated
- The API key used is created with Positioning API scope enabled.
Venue API
The full metadata corresponding to the floorPlanId and venueId returned by the /locate endpoint can be fetched from the API. For example
FLOOR_PLAN_ID=a314b673-d27d-4bd1-a9bf-bc0cdbd7147c curl "https://positioning-api.indooratlas.com/v1/floor_plans/$FLOOR_PLAN_ID?key=$APIKEY"
returns
{
"name": "Floor 4",
"floorNumber": 4,
"id": "a314b673-d27d-4bd1-a9bf-bc0cdbd7147c",
"venueId": "9760790b-4069-41d0-949a-3ed28ad2dbe8",
"image": {
"url": "https://example.com/af4eb6ce-213b-4dc2-816a-a8b6998657fa",
"height": 3307,
"width": 2339,
"widthMeters": 30.09341767991734,
"heightMeters": 42.54764098652699,
"metersToPixels": 77.72463815437345,
"pixelsToMeters": 0.012865933167985183,
"center": {
"lat": 60.170568759612436,
"lon": 24.945683777332306
},
"topLeft": {
"lat": 60.17038459999827,
"lon": 24.94597318695491
},
"bottomLeft": {
"lat": 60.17076602968718,
"lon": 24.945935824520134
},
"bottomRight": {
"lat": 60.17075286193615,
"lon": 24.945394370732014
},
"topRight": {
"lat": 60.170371432247244,
"lon": 24.94543173316679
}
}
}and
VENUE_ID=9760790b-4069-41d0-949a-3ed28ad2dbe8 curl "https://positioning-api.indooratlas.com/v1/venues/$VENUE_ID?key=$APIKEY"
gives the list of all floor plans in that venue (a.k.a. location):
{
"name": "Mikonkatu 13 Office",
"id": "9760790b-4069-41d0-949a-3ed28ad2dbe8",
"coordinates": {
"lat": 60.1704947,
"lon": 24.9456069
},
"floorPlans": [
{
"floorNumber": 3,
"id": "75f42ddd-33ea-4122-8964-9ce2b84b15c5",
"name": "Floor 3",
"venueId": "9760790b-4069-41d0-949a-3ed28ad2dbe8",
"image": { ... }
},
{
"name": "Floor 4",
"floorNumber": 4,
"id": "a314b673-d27d-4bd1-a9bf-bc0cdbd7147c",
"venueId": "9760790b-4069-41d0-949a-3ed28ad2dbe8",
"image": { ... }
}
]
}