Create virtual tours by linking multiple panoramas
Name | Type | Description |
---|---|---|
psv |
PSV.Viewer | |
options |
PSV.plugins.VirtualTourPlugin.Options | optional |
Extends
Members
-
Available events
-
-
-
In client mode all the nodes are provided in the config or with the
setNodes
method -
-
In GPS mode each node is globally positionned and the links are automatically computed
-
-
In manual mode each link is positionned manually on the panorama
-
-
-
In server mode the nodes are fetched asynchronously
-
-
-
Unique identifier of the plugin
-
-
psv PSV.Viewer readonly inherited overrides
Reference to main controller
-
Methods
-
destroy () package overrides
-
-
init () package overrides
-
-
Tests if running in 3D mode
-
Returns:
Type Description boolean -
Tests if running in GPS mode
-
Returns:
Type Description boolean -
Tests if running in server mode
-
Returns:
Type Description boolean -
Changes the current node
-
Name Type Default Description nodeId
string fromLink
PSV.plugins.VirtualTourPlugin.NodeLink null optional Returns:
Type Description Promise.<boolean> resolves false if the loading was aborted by another call -
Sets the nodes (client mode only)
-
Name Type Description nodes
Array.<PSV.plugins.VirtualTourPlugin.Node> startNodeId
string optional Throws:
-
when the configuration is incorrect
- Type
- PSV.PSVError
-
Type Definitions
-
Style of the arrow in 3D mode
-
Properties:
Name Type Argument Default Description color
string <optional>
0xaaaaaa hoverColor
string <optional>
0xaa5500 outlineColor
number <optional>
0x000000 scale
Array.<number> <optional>
[0.5,2] -
PSV.plugins.VirtualTourPlugin.GetNode (nodeId)PSV.plugins.VirtualTourPlugin.Node | Promise.<PSV.plugins.VirtualTourPlugin.Node>
Function to load a node
-
Name Type Description nodeId
string Returns:
Type Description PSV.plugins.VirtualTourPlugin.Node | Promise.<PSV.plugins.VirtualTourPlugin.Node> -
Definition of a single node in the tour
-
Properties:
Name Type Argument Description id
string unique identifier of the node
panorama
* links
Array.<PSV.plugins.VirtualTourPlugin.NodeLink> <optional>
links to other nodes
position
Array.<number> <optional>
GPS position (longitude, latitude, optional altitude)
panoData
PSV.PanoData | PSV.PanoDataProvider <optional>
data used for this panorama
sphereCorrection
PSV.SphereCorrection <optional>
sphere correction to apply to this panorama
name
string <optional>
short name of the node
caption
string <optional>
caption visible in the navbar
description
string <optional>
description visible in the side panel
thumbnail
string <optional>
thumbnail for the gallery
markers
Array.<PSV.plugins.MarkersPlugin.Properties> <optional>
additional markers to use on this node
-
Data associated to the "node-changed" event
-
[fromNode] - The previous node
-
PSV.plugins.VirtualTourPlugin.NodeLink PSV.ExtendedPosition
Definition of a link between two nodes
-
Properties:
Name Type Argument Description nodeId
string identifier of the target node
name
string <optional>
override the name of the node (tooltip)
position
Array.<number> <optional>
override the GPS position of the node
markerStyle
PSV.plugins.MarkersPlugin.Properties <optional>
override global marker style
arrowStyle
PSV.plugins.VirtualTourPlugin.ArrowStyle <optional>
override global arrow style
-
Properties:
Name Type Argument Default Description dataMode
'client' | 'server' <optional>
'client' configure data mode
positionMode
'manual' | 'gps' <optional>
'manual' configure positioning mode
renderMode
'markers' | '3d' <optional>
'3d' configure rendering mode of links
nodes
Array.<PSV.plugins.VirtualTourPlugin.Node> <optional>
initial nodes
getNode
PSV.plugins.VirtualTourPlugin.GetNode <optional>
startNodeId
string <optional>
id of the initial node, if not defined the first node will be used
preload
boolean | PSV.plugins.VirtualTourPlugin.Preload <optional>
false preload linked panoramas
rotateSpeed
boolean | string | number <optional>
'20rpm' speed of rotation when clicking on a link, if 'false' the viewer won't rotate at all
transition
boolean | number <optional>
1500 duration of the transition between nodes
linksOnCompass
boolean <optional>
if the Compass plugin is enabled, displays the links on the compass, defaults to
true
on in markers render modemarkerStyle
PSV.plugins.MarkersPlugin.Properties <optional>
global marker style
arrowStyle
PSV.plugins.VirtualTourPlugin.ArrowStyle <optional>
global arrow style
markerLatOffset
number <optional>
-0.1 (GPS & Markers mode) latitude offset applied to link markers, to compensate for viewer height
arrowPosition
'top' | 'bottom' <optional>
'bottom' (3D mode) arrows vertical position
-
Function to determine if a link must be preloaded
-
Name Type Description node
PSV.plugins.VirtualTourPlugin.Node link
PSV.plugins.VirtualTourPlugin.NodeLink Returns:
Type Description boolean
Events
-
Triggered when the current node changes
-
Name Type Description nodeId
string -
Triggered when the current node is changed
-
Name Type Description nodeId
string data
PSV.plugins.VirtualTourPlugin.NodeChangedData