Wayfinder

cbOnPOIClick(poi : POI)

Called when data is loaded

cbOnDataLoaded()

Called when data is loaded

cbOnProgress(percentage : float)

Called when data is being loaded

cbOnLanguageChange(language : string)

Called when language is changed

cbOnBeforeFloorChange(floor : Floor)

Called before floor is changed

cbOnFloorChange(floor : Floor)

Called after floor is changed

cbOnZoomChange(zoom : float)

Called when zoom is changed

cbOnMapUpdate()

Called when map is rerendered – 2D?

cbOnMapReady()

Called when map is rerendered – 2D?

open(project : string)

Opens a project. Call this to initiate everything.

readProjectName()

Reads project name from URL

getLayout()

Reads project layout from URL

getProject() => string

Get the project name

getAPILocation() => string

Get the location where the API makes requests

setKiosk(ID : Number)

Set the Node which is focus point

getKiosk() => Number

Get the location where map is focused and where the path starts

getKioskNode() => NavigationNode

Get the NavigationNode of the current location

showPath(destination : NavigationNode, poi: POI?)

Show path to the given node

findPath(from : NavigationNode, to: NavigationNode)

Find path from a to b

showPathFromPOIToPOI(from : POI, to: POI)

Find path from POI a to POI b

showKiosk()

Show default view

showFloor(floor, callback)

Shows floor hiding all floors that are above given floor

getLanguage() => Language

Get current language

setLanguage(language : string)

Set current language

loadPOIIcons()

Load the POI icons for later use

loadHiddenPOIIcons()

Loads POI icons that aren’t important before start

resize()

Resize manually the map view. Call after changing the canvas element dimensions

onPOIClick()

Must be called by whatever detects POI clicks when POI is clicked. For 3d it is called by POIController.

setZoom(percentage : float)

Set the map zoom level

zoomIn()

Increase map zoom by one step

zoomOut()

Decrease map zoom by one step

pathToText(path : array, ) => object

Translate path to human readable object

getPOIWithExternalId(id: string) => POI

Find a POI with given external room id

getNearestPOI(source : Node, list : Array, ) => POI

Get the nearest POI from the given POIs list

restoreDefaultState()

Restore default state – kiosk view, default language, clear highlights

setHighlights(list : Array)

Highlight list of POIs

clearHighlights()

Removes highlight from previously highlighted locations

setDisplaying(list : Array)

Display list of POIs

clearDisplaying()

Removes previously displaying locations

getLanguages() => Array

Returns list of languages

getPOIs() => Object

Returns list of POIs

getPOIArray() => Array

Returns array of POIs

getPOIGroups() => Array

Returns list of POI groups

getShortcuts() => Array

Returns shortcuts groups

getNodes() => Array

Returns list of Nodes

getEdges() => Array

Returns list of edges

run()

Run map when paused

pause()

Pause map when running

clearPath()

Clear the path

getScreenPosition(poi: POI)

Get the given POIs location on the screen

events => WayfinderEvents

Event class

search => WayfinderSearch

Search class

translator => Translator

Translator class

POI

Provides access to POI info.

getID() => int

Returns POI id

getName(language : string) => string

Returns POIs name for given language

getNames() => object

Returns POIs translations {“en”: “Name”}

hasName(language) => boolean

Check if POI name is set in given language

getFirstChar(language) => string

Returns lowercase first letter of POIs name

getDescription(language : string) => string

Returns POIs description for given language

getDescriptions() => object

Returns POIs descriptions {“en”: “Description”}

getShowInMenu() => boolean

Returns if the POI should displayed in the menu

setShowInMenu(value)

Set if POI should be shown in the menu or not

getFloor() => Floor

Get the POIs floor

getNode() => Node

Returns POIs Node

getGroups() => Array

Returns POIs groups

addGroup(group: Group)

Add group to POI

getGroupNames(language) => Object

Gets translations in given language of names of all groups

addAdvertisement(advertisement)

Add an advertisement

getTags() => string

Returns POIs tags

getIcon() => Image

Returns POIs icon

getIconUrl() => String

Returns POIs icon url

getBackground() => Image

Returns POIs background image

getBackgroundUrl() => String

Returns POIs background image url

getRoomId() => string

Returns POIs external room id

isAlwaysVisible() => boolean

If POI is always shown

getSetting(key, default) => any

Returns POI specific setting

getSettingBoolean(key, default) => boolean

Returns POI specific boolean setting

getSettingFloat(key, default) => float

Returns POI specific float setting

hasSetting(key) => boolean

Returns true if the setting is set

POIGroup

Provides access to POI group info.

getID() => int

Returns groups id

getNames() => Object

Returns groups list of names

getName(language : string) => string

Returns group name for given language

getDescription(language: string) => String

Returns group description for given language

getDescriptions() => Object

Returns group description translations {“en”: “Description”}

getShowInMenu() => boolean

Returns if group is shown in the menu

getShowInTopMenu() => boolean

Returns if group should be shown in the top hot topics menu

getImageID() => int

Returns group image id

getPOIs() => Array

Returns group POIs

addPOI(poi: POI)

Add POI to group

getColor() => Color

Returns group color

getIconUrl() => string

Returns group icon url

getChildren() => Array

Returns group children id’s

getParent() => POIGroup

Returns group parent if set else null

Floor

Provides access to floor info and Nodes/POIs related to this floor.

getID() => int

Returns floor id

getName(language : string) => string

Returns floor name for given language

getNames() => Array

Returns list of names

getPOIs() => Array

Returns list of POIs on this floor

getNodes() => Array

Returns list of Nodes on this floor

getShowInMenu() => boolean

Is floor hidden or not

Building

Provides access to Building info.

addFloor()

Adds a new floor

removeFloor()

Removes a floor

getFloors() => Array

Gets all floors of the building as an object

getSortedFloors() => Array

Gets all floors sorted by index as an array

getCurrentFloor() => Floor

Get current active floor

setCurrentFloor(floor: Floor)

Set current floor

Settings

Provides access Wayfinder Settings

has(key: string)

Check if setting exists

get(key: string, defaultValue: any)

Returns a setting by key ‘as is’.

getInt(key: string, defaultValue)

Returns a setting by key as integer.

getFloat(key: string, defaultValue)

Returns a setting by key as float.

getColor(key: string, defaultValue)

Returns a setting by key as color.

getBoolean(key: string, defaultValue)

Returns a setting by key as boolean.

set(key: string, value)

Sets a setting value.

NavigationNode

Provides access to node info (3D position, rotation, type) and POIs related to this node.

getID() => int

Get Node id

getFloor() => Floor

Get Floor where the Node is set

getPOIs() => Array

Get POIs attached to this Node

Language

Language representation (holds translations)

getName() => string

Name of this language (unique name, not translated name)

getNativeName() => string

Native name of this language (Deutch, Eesti keel)

getID() => int

ID of this language

getTextDirection() => string

WayfinderEvents

Event class

on(type: string, callback: function)

Start listening to given event

WayfinderSearch

Search class

overrideOptions(options: Object)

Override search options

clearResults()

Clear previous results

search(searchstring: string)

Search pois with given string

findWithChar(character: string)

Search pois with given char