Logo
Developer

VisioWeb Essential 1.17.2

Class

Navigation

VisioWebEssential's Navigation module dedicated to navigation instructions management and display.

Constructor

new Navigation()

Since:
  • 1.10.0

Members summary


Name Description
currentInstructionIndex The current instruction index, set to 0 when navigation is created.
translator Proxy for VisioWeb's navigation translator, initialized at start up based on the map's place data and the user's language.
languageCode Computed language code based on the user's requested language (navigator.language or user input) and the available language codes in the map's place data.
isValid Whether a navigation is currently available or not.
nbInstructions The number of instructions for the current navigation.

Methods summary


Name Description
getCurrentInstructionBrief Retrieves the current instruction's brief description.
getCurrentInstructionDetail Retrieves the current instruction's detailed description.
getCurrentInstructionIcon Retrieves the current instruction's icon URL.
goToPreviousInstruction Animates the camera to the previous instruction segment and decrements the current instruction index.
goToNextInstruction Animates the camera to the next instruction segment and increments the current instruction index.
setLanguageCode Sets the language code depending on the language codes available in the map's place data.

Members detail

currentInstructionIndex :number

The current instruction index, set to 0 when navigation is created.
Since:
  • 1.10.0

translator :NavigationTranslator

Proxy for VisioWeb's navigation translator, initialized at start up based on the map's place data and the user's language.
Since:
  • 1.10.0
See:

languageCode :string

Computed language code based on the user's requested language (navigator.language or user input) and the available language codes in the map's place data.
Since:
  • 1.10.0

isValid :boolean

Whether a navigation is currently available or not.
Since:
  • 1.10.0

nbInstructions :number

The number of instructions for the current navigation.
Since:
  • 1.10.0

Methods detail

getCurrentInstructionBrief() → {string}

Retrieves the current instruction's brief description.
Since:
  • 1.10.0
Returns:
Type
string

getCurrentInstructionDetail() → {string}

Retrieves the current instruction's detailed description.
Since:
  • 1.10.0
Returns:
Type
string

getCurrentInstructionIcon() → {string}

Retrieves the current instruction's icon URL.
Since:
  • 1.10.0
Returns:
Type
string

goToPreviousInstruction() → {Promise}

Animates the camera to the previous instruction segment and decrements the current instruction index.
Since:
  • 1.10.0
Returns:
Type
Promise

goToNextInstruction() → {Promise}

Animates the camera to the next instruction segment and increments the current instruction index.
Since:
  • 1.10.0
Returns:
Type
Promise

setLanguageCode(arguments)

Sets the language code depending on the language codes available in the map's place data.
Parameters:
Name Type Description
arguments Object
Properties
Name Type Description
languageCode string the requested language code
Since:
  • 1.10.0