Logo
Developer

VisioWeb Essential 1.17.2

Class

Venue

VisioWebEssential's Venue module dedicated to venue layout management and camera animations.

Constructor

new Venue()

Since:
  • 1.10.0

Members summary


Name Description
layout The venue's layout as a hierarchy of buildings and floors.
currentBuildingID The currently selected building's ID.
currentFloorID The currently selected floor's ID.
currentExploreMode The current exploration mode. Can be 'global', 'building' or 'floor'.

Methods summary


Name Description
getLocalizedName Returns the localized name (when localization is available) for a given item of the venue's layout.
getLocalizedShortName Returns the localized short name (when localization is available) for a given item of the venue's layout.
getFootprintPoints Returns all the footprint points for a given id as an array of {lat, lon} coordinates.
getPointOfFocus Returns the point of focus for a given id.
getViewpoint Returns an object describing the ideal viewpoint to display the input array of points given other (optional) parameters.
Can be used to compute the ideal viewpoint to show a specific POI using the result of getFootprintPoints.
goToGlobal Animates the camera to show the whole map.
goToBuilding Animates the camera to show a specific building.
goToFloor Animates the camera to show a specific floor.
goToPlace Animates the camera to show a specific place.
goToViewpoint Animates the camera to show a specific viewpoint. This method can directly take the return value of getViewpoint API.

Members detail

layout :Object

The venue's layout as a hierarchy of buildings and floors.
Since:
  • 1.10.0

currentBuildingID :string

The currently selected building's ID.
Since:
  • 1.10.0

currentFloorID :string

The currently selected floor's ID.
Since:
  • 1.10.0

currentExploreMode :string

The current exploration mode. Can be 'global', 'building' or 'floor'.
Since:
  • 1.10.0
See:

Methods detail

getLocalizedName(arguments) → {string}

Returns the localized name (when localization is available) for a given item of the venue's layout.
Parameters:
Name Type Description
arguments Object
Properties
Name Type Description
id string building or floor id
Since:
  • 1.10.0
Returns:
Type
string

getLocalizedShortName(arguments) → {string}

Returns the localized short name (when localization is available) for a given item of the venue's layout.
Parameters:
Name Type Description
arguments Object
Properties
Name Type Description
id string building or floor id
Since:
  • 1.10.0
Returns:
Type
string

getFootprintPoints(arguments) → {Array.<Object>}

Returns all the footprint points for a given id as an array of {lat, lon} coordinates.
Parameters:
Name Type Description
arguments Object
Properties
Name Type Description
id string the input footprint id
Since:
  • 1.10.0
See:
Returns:
points
Type
Array.<Object>

getPointOfFocus(arguments) → {Object}

Returns the point of focus for a given id.
Parameters:
Name Type Description
arguments Object
Properties
Name Type Description
id string the input point of focus id
Since:
  • 1.10.0
See:
Returns:
{id, floor, heading, position: {lat, lon, height}}
Type
Object

getViewpoint(arguments) → {Object}

Returns an object describing the ideal viewpoint to display the input array of points given other (optional) parameters.
Can be used to compute the ideal viewpoint to show a specific POI using the result of getFootprintPoints.
Parameters:
Name Type Description
arguments Object
Properties
Name Type Attributes Description
points Array.<Object> the input array of points
padding Object <optional>
the expected padding provided as {top, bottom, left, right}
pitch number <optional>
the expected pitch
heading number <optional>
the expected heading
Since:
  • 1.10.0
See:
Returns:
{position: {lat, lon}, radius, pitch, heading}
Type
Object

goToGlobal(argumentsopt) → {Promise}

Animates the camera to show the whole map.
Parameters:
Name Type Attributes Description
arguments Object <optional>
Properties
Name Type Attributes Description
animationDuration Number <optional>
the animation duration in seconds. Overrides all the visioweb.MultiBuildingView properties related to animation duration (e.g. when animating camera position, orientation, or animating floors).
Since:
  • 1.10.0
See:
Returns:
Type
Promise

goToBuilding(argumentsopt) → {Promise}

Animates the camera to show a specific building.
Parameters:
Name Type Attributes Description
arguments Object <optional>
Properties
Name Type Attributes Description
id string <optional>
the target building's ID
animationDuration Number <optional>
the animation duration in seconds. Overrides all the visioweb.MultiBuildingView properties related to animation duration (e.g. when animating camera position, orientation, or animating floors).
Since:
  • 1.10.0
See:
Returns:
Type
Promise

goToFloor(argumentsopt) → {Promise}

Animates the camera to show a specific floor.
Parameters:
Name Type Attributes Description
arguments Object <optional>
Properties
Name Type Attributes Description
id string <optional>
the target floor's ID
animationDuration Number <optional>
the animation duration in seconds. Overrides all the visioweb.MultiBuildingView properties related to animation duration (e.g. when animating camera position, orientation, or animating floors).
Since:
  • 1.10.0
See:
Returns:
Type
Promise

goToPlace(arguments) → {Promise}

Animates the camera to show a specific place.
Parameters:
Name Type Description
arguments Object
Properties
Name Type Attributes Description
id string the target place's ID
radius number <optional>
the expected radius
heading number <optional>
the expected heading
pitch number <optional>
the expected pitch
animationDuration Number <optional>
the animation duration in seconds. Overrides all the visioweb.MultiBuildingView properties related to animation duration (e.g. when animating camera position, orientation, or animating floors).
Since:
  • 1.10.0
See:
Returns:
Type
Promise

goToViewpoint(arguments) → {Promise}

Animates the camera to show a specific viewpoint. This method can directly take the return value of getViewpoint API.
Parameters:
Name Type Description
arguments Object
Properties
Name Type Attributes Description
position string the viewpoint's position
radius number the viewpoint's radius
heading number <optional>
the viewpoint's heading
pitch number <optional>
the viewpoint's pitch
floor string <optional>
the target floor
animationDuration Number <optional>
the animation duration in seconds. Overrides all the visioweb.MultiBuildingView properties related to animation duration (e.g. when animating camera position, orientation, or animating floors).
Since:
  • 1.10.0
See:
Returns:
Type
Promise