WayfindingManager
Properties
locationRepository
Type | Read-Only | Default | Description |
---|---|---|---|
LocationRepository | YES | - |
Methods
addEventListener
addEventListener ( type : string, listener: function ) : null
Adds a listener to an event type.
Parameters:
Name | Type | Required | Description |
---|---|---|---|
type | string | Yes | The type of event to listen to. |
listener | function | Yes | The function that gets called when the event is fired. |
Returns:
Type: null
computePath
async computePath(path: Path): Promise<void, Error>
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
path | Path | Yes | - |
Returns:
Type: Promise<void, Error>
drawPathSection
async drawPathSection(pathSection: PathSection): Promise<void, Error>
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
pathSection | Path | Yes | - |
Returns:
Type: Promise<void, Error>
getUserDistanceFromPath
async getUserDistanceFromPath(path: Path): Promise<number, Error>
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
path | Path | Yes | - |
Returns:
Type: Promise<number, Error>
getUserDistanceFromPathSection
async getUserDistanceFromPathSection(pathSection: PathSection): Promise<number, Error>
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
pathSection | Path | Yes | - |
Returns:
Type: Promise<number, Error>
getUserGpsPosition
async getUserDistanceFromPathSection(pathSection: PathSection): Promise<?{floor: ?FloorObject, utm: {E: number, N: number, alt: number}}, Error>
Returns:
Type: Promise<?{floor: ?FloorObject, utm: {E: number, N: number, alt: number}}, Error>
getUserUtmPosition
async getUserDistanceFromPathSection(pathSection: PathSection): Promise<?{floor: ?FloorObject, gps: {lat: number, long: number, alt: number}}, Error>
Returns:
Type: Promise<?{floor: ?FloorObject, gps: {lat: number, long: number, alt: number}}, Error>
hasEventListener
hasEventListener( type : string, listener: function ) : boolean
Checks if listener is added to an event type.
Parameters:
Name | Type | Required | Description |
---|---|---|---|
type | string | Yes | The type of event to listen to. |
listener | function | Yes | The function that gets called when the event is fired. |
Returns:
Type: null
removeEventListener
removeEventListener ( type : string, listener: function ) : null
Removes a listener from an event type.
Parameters:
Name | Type | Required | Description |
---|---|---|---|
type | string | Yes | The type of the listener that gets removed. |
listener | function | Yes | The listener function that gets removed. |
Returns:
Type: null
removePath
async removePath(path: Path): Promise<void, Error>
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
path | Path | Yes | - |
Returns:
Type: Promise<void, Error>
removePathSection
async removePathSection(pathSection: PathSection): Promise<void, Error>
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
pathSection | Path | Yes | - |
Returns:
Type: Promise<void, Error>
setUserAdsumPosition
async setUserAdsumPosition(position: {x: number, y: number, z: number}, floor = null: ?FloorObject, isWorldPosition = false: boolean): Promise<void, Error>
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
position | {x: number, y: number, z: number} | Yes | - | |
floor | ?FloorObject | No | null | |
isWorldPosition | boolean | no | false |
Returns:
Type: Promise<void, Error>
setUserGpsPosition
async setUserGpsPosition(gpsPosition: {lat: number, long: number, alt: number}, floor = null: ?FloorObject): Promise<void, Error>
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
gpsPosition | {lat: number, long: number, alt: number} | Yes | - | |
floor | ?FloorObject | No | null |
Returns:
Type: Promise<void, Error>
setUserUtmPosition
async setUserUtmPosition(utmPosition: {E: number, N: number, alt: number}, floor = null: ?FloorObject): Promise<void, Error>
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
utmPosition | {E: number, N: number, alt: number} | Yes | - | |
floor | ?FloorObject | No | null |
Returns:
Type: Promise<void, Error>
Events
WAYFINDING_EVENTS.user.position.didChanged
The listener will receive the following parameters
Listener Parameters:
Name | Type | Description |
---|---|---|
data | object | |
data.floor | ?FloorObject |