Class: CompassPlugin


new PSV.plugins.CompassPlugin (psv, options)

Adds a compass on the viewer

Name Type Description
psv PSV.Viewer
options PSV.plugins.CompassPlugin.Options



id string readonly inherited overrides

Unique identifier of the plugin

Reference to main controller


destroy () package overrides

setHotspots (hotspots)

Changes the hotspots on the compass

Name Type Description
hotspots Array.<PSV.plugins.CompassPlugin.Hotspot>

Type Definitions

PSV.plugins.CompassPlugin.Hotspot PSV.ExtendedPosition

[color] - override the global "hotspotColor"

PSV.plugins.CompassPlugin.Options Object

Name Type Argument Default Description
size string <optional>

size of the compass

position string <optional>
'top left'

position of the compass

backgroundSvg string <optional>

SVG used as background of the compass

coneColor string <optional>
'rgba(255, 255, 255, 0.5)'

color of the cone of the compass

navigation boolean <optional>

allows to click on the compass to rotate the viewer

navigationColor string <optional>
'rgba(255, 0, 0, 0.2)'

color of the navigation cone

hotspots Array.<PSV.plugins.CompassPlugin.Hotspot> <optional>

small dots visible on the compass (will contain every marker with the "compass" data)

hotspotColor string <optional>
'rgba(0, 0, 0, 0.5)'

default color of hotspots