Constructor
new Venue()
- Since:
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:
currentBuildingID :string
The currently selected building's ID.
- Since:
currentFloorID :string
The currently selected floor's ID.
- Since:
currentExploreMode :string
The current exploration mode. Can be 'global', 'building' or 'floor'.
- Since:
- 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:
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:
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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- See:
-
Returns:
-
Type
-
Promise