Class: CompassPlugin

PSV.plugins.CompassPlugin

new PSV.plugins.CompassPlugin (psv, options)

Adds a compass on the viewer

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

Extends

Members

id string readonly inherited overrides

Unique identifier of the plugin

Reference to main controller

Methods

clearHotspots ()

Removes all hotspots

destroy () package overrides

hide ()

Hides the compass

init () package overrides

setHotspots (hotspots)

Changes the hotspots on the compass

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

show ()

Shows the compass

Type Definitions

PSV.plugins.CompassPlugin.Hotspot PSV.ExtendedPosition

[color] - override the global "hotspotColor"

PSV.plugins.CompassPlugin.Options Object

Properties:
Name Type Argument Default Description
size string <optional>
'120px'

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>
true

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