Wayfinding - Get Path
Applies to: see pricing tiers.
Creator makes it possible to develop applications based on your private indoor map data using Azure Maps API and SDK. See the Creator for indoor maps article for an introduction to the Azure Maps Creator concepts and tools.
The Wayfinding Service API is part of Creator, and adheres to the Open Geospatial Consortium standard and uses indoor maps data from the routeset to calculate the best path between two locations within the same facility.
GET https://{geography}.atlas.microsoft.com/wayfinding/path?api-version=2022-09-01-preview&routesetId={routesetId}&facilityId={facilityId}&fromPoint={fromPoint}&fromLevel={fromLevel}&toPoint={toPoint}&toLevel={toLevel}
GET https://{geography}.atlas.microsoft.com/wayfinding/path?api-version=2022-09-01-preview&routesetId={routesetId}&facilityId={facilityId}&fromPoint={fromPoint}&fromLevel={fromLevel}&toPoint={toPoint}&toLevel={toLevel}&avoidFeatures={avoidFeatures}&minWidth={minWidth}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
geography
|
path | True |
string |
This parameter specifies where the Azure Maps Creator resource is located. Valid values are us and eu. |
api-version
|
query | True |
string |
Version number of Azure Maps API. |
facility
|
query | True |
string |
The identifier of the facility within the routeset where to find the path. |
from
|
query | True |
integer int32 |
The path origin level. |
from
|
query | True |
string |
The path origin point in the following format: {latitude},{longitude}. |
routeset
|
query | True |
string |
The ID of the routeset to query from. |
to
|
query | True |
integer int32 |
The path destination level. |
to
|
query | True |
string |
The path destination in the following format: {latitude},{longitude}. |
avoid
|
query |
array |
To avoid certain types of connectors in the resulting path. Can be specified multiple times in one request, for example, '&avoidFeatures=elevators&avoidFeatures=escalators'. |
|
min
|
query |
number |
The minimum width (in meters) of openings in the resulting path. For example, if you specified a minimum width of 0.5, the searched path will avoid openings less than 0.5 meters wide. Note: by using this value, the resulting path points will be buffered from walls and other vertical obstacles by half of the distance provided. |
Request Header
Name | Required | Type | Description |
---|---|---|---|
x-ms-client-id |
string |
Specifies which account is intended for usage in conjunction with the Azure AD security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Azure AD security in Azure Maps see the following articles for guidance. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
|
Other Status Codes |
An unexpected error occurred. |
Security
AADToken
These are the Azure Active Directory OAuth2 Flows. When paired with Azure role-based access control it can be used to control access to Azure Maps REST APIs. Azure role-based access controls are used to designate access to one or more Azure Maps resource account or sub-resources. Any user, group, or service principal can be granted access via a built-in role or a custom role composed of one or more permissions to Azure Maps REST APIs.
To implement scenarios, we recommend viewing authentication concepts. In summary, this security definition provides a solution for modeling application(s) via objects capable of access control on specific APIs and scopes.
Notes
- This security definition requires the use of the
x-ms-client-id
header to indicate which Azure Maps resource the application is requesting access to. This can be acquired from the Maps management API.
The Authorization URL
is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations.
*
The Azure role-based access control is configured from the Azure management plane via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.
*
Usage of the Azure Maps Web SDK allows for configuration based setup of an application for multiple use cases.
- Currently, Azure Active Directory v1.0 or v2.0 supports Work, School, and Guests but does not support Personal accounts.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
https://atlas.microsoft.com/.default | https://atlas.microsoft.com/.default |
subscription-key
This is a shared key that is provisioned when you Create an Azure Maps account in the Azure portal or using PowerShell, CLI, Azure SDKs, or REST API.
With this key, any application can access all REST API. In other words, this key can be used as a master key in the account that they are issued in.
For publicly exposed applications, our recommendation is to use the confidential client applications approach to access Azure Maps REST APIs so your key can be securely stored.
Type:
apiKey
In:
query
SAS Token
This is a shared access signature token is created from the List SAS operation on the Azure Maps resource through the Azure management plane via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.
With this token, any application is authorized to access with Azure role-based access controls and fine-grain control to the expiration, rate, and region(s) of use for the particular token. In other words, the SAS Token can be used to allow applications to control access in a more secured way than the shared key.
For publicly exposed applications, our recommendation is to configure a specific list of allowed origins on the Map account resource to limit rendering abuse and regularly renew the SAS Token.
Type:
apiKey
In:
header
Examples
Get the shortest path between two points in the facility.
Sample Request
GET https://us.atlas.microsoft.com/wayfinding/path?api-version=2022-09-01-preview&routesetId=[routeset-Id]&facilityId=[facility-Id]&fromPoint=47.652882287901065,-122.13400410050512&fromLevel=-1&toPoint=47.652870534630466,-122.13382884389553&toLevel=0
Sample Response
{
"noResultExplanation": "NoExplanation",
"paths": [
{
"lengthInMeters": 51.27548,
"timeInSeconds": 60,
"legs": [
{
"mode": "Default",
"lengthInMeters": 14.7605,
"timeInSeconds": 15,
"startLevel": 0,
"endLevel": 0,
"points": [
{
"latitude": 47.6528823,
"longitude": -122.1340041
},
{
"latitude": 47.6528688,
"longitude": -122.1340336
},
{
"latitude": 47.6528591,
"longitude": -122.1340534
},
{
"latitude": 47.6528309,
"longitude": -122.1341107
},
{
"latitude": 47.6527984,
"longitude": -122.1341556
}
]
},
{
"mode": "Stair",
"lengthInMeters": 7.88608,
"timeInSeconds": 16,
"startLevel": 0,
"endLevel": 1,
"points": [
{
"latitude": 47.6527984,
"longitude": -122.1341556
},
{
"latitude": 47.6527843,
"longitude": -122.1341395
}
]
},
{
"mode": "Default",
"lengthInMeters": 28.6289,
"timeInSeconds": 29,
"startLevel": 1,
"endLevel": 1,
"points": [
{
"latitude": 47.6527843,
"longitude": -122.1341395
},
{
"latitude": 47.6527843,
"longitude": -122.1341395
},
{
"latitude": 47.6527843,
"longitude": -122.1341395
},
{
"latitude": 47.6527846,
"longitude": -122.1341332
},
{
"latitude": 47.652789,
"longitude": -122.1341315
},
{
"latitude": 47.6527898,
"longitude": -122.1341312
},
{
"latitude": 47.6527913,
"longitude": -122.1341306
},
{
"latitude": 47.6527938,
"longitude": -122.1341295
},
{
"latitude": 47.6528309,
"longitude": -122.1341137
},
{
"latitude": 47.652856,
"longitude": -122.1340564
},
{
"latitude": 47.6528694,
"longitude": -122.1340372
},
{
"latitude": 47.652873,
"longitude": -122.1339296
},
{
"latitude": 47.6528735,
"longitude": -122.1339124
},
{
"latitude": 47.6528733,
"longitude": -122.1339095
},
{
"latitude": 47.6528732,
"longitude": -122.1338288
}
]
}
]
}
]
}
Definitions
Name | Description |
---|---|
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Leg |
A section of the overall path. |
No |
In the event that no paths are found, the |
Path |
The details about a particular path between the origin and destination. It can be made up of one or more legs. |
Point |
A point within the facility. |
Wayfind |
The object returned by this Wayfinding Path request. |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ErrorDetail
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
Leg
A section of the overall path.
Name | Type | Description |
---|---|---|
endLevel |
integer |
The floor where this leg ends. |
lengthInMeters |
number |
The leg length, in meters, of this leg. |
mode |
string |
The leg mode of traversal for this leg. It can be default (all on the same level), elevators or stairs when moving vertically between levels. |
points |
Point[] |
The leg shape points. Their vertical position is determined as follows: all the points are at the same height when startLevel and endLevel are the same, otherwise the array will contain only two points: the first at startLevel and the second at endLevel. |
startLevel |
integer |
The floor where this leg starts. |
timeInSeconds |
integer |
The leg travel time, in seconds, to travel between the first and last point of this leg. |
NoResultExplanation
In the event that no paths are found, the paths
array will be empty. If the reason no paths were found can be determined, this property will provide an explanation why.
Name | Type | Description |
---|---|---|
NoExplanation |
string |
Default value provided when a result is returned or it wasn't possible to determine why a path wasn't found. |
Path
The details about a particular path between the origin and destination. It can be made up of one or more legs.
Name | Type | Description |
---|---|---|
legs |
Leg[] |
The different travel sections of this path. |
lengthInMeters |
number |
The path length, in meters, of the entire path. |
timeInSeconds |
integer |
The path total time, in seconds, to travel between the origin and the destination when following this path. |
Point
A point within the facility.
Name | Type | Description |
---|---|---|
latitude |
number |
the point latitude |
longitude |
number |
the point longitude |
WayfindResult
The object returned by this Wayfinding Path request.
Name | Type | Description |
---|---|---|
noResultExplanation |
In the event that no paths are found, the |
|
paths |
Path[] |
An array of wayfinding path results. An empty array will be returned if no results were found. |