ViewerOptions
Interface: ViewerOptions
Behaviour options for a WemapViewer. Identity (emmid), auth and the
VPS endpoint are NOT here — they come from @wemap/core (core.init()).
Properties
claimClick?
optionalclaimClick?: (click) =>boolean
Whether a click in this direction is the host's, e.g. on something it draws:
it then walks nowhere and is reported as a click, and the floor pointer hides.
Parameters
click
Returns
boolean
maxFov?
optionalmaxFov?:number
Widest vertical field of view the wheel zooms out to, in degrees. Defaults to 80.
navigation?
optionalnavigation?:boolean
In-panorama navigation: hovering the floor shows a disc and a cross on the nearest node; clicking walks there. Defaults to true.
onClick?
optionalonClick?: (click) =>void
Fired with the view direction of a click that walks nowhere, in navigate mode.
Parameters
click
Returns
void
onError?
optionalonError?: (error) =>void
Fired when the graph, an image, a located point or a measurement fails to load.
Parameters
error
Error
Returns
void
onHeadingChange?
optionalonHeadingChange?: (heading) =>void
Fired when look heading changes (degrees), e.g. to sync a compass.
Parameters
heading
number
Returns
void
onLocate?
optionalonLocate?: (point) =>void
Fired with the position under a click, in locate click mode.
Parameters
point
Returns
void
onMeasure?
optionalonMeasure?: (measurement) =>void
Fired with the distance between two clicks, in measure click mode.
Parameters
measurement
Returns
void
onNavigate?
optionalonNavigate?: (nodeId) =>void
Fired as soon as a move to a node starts (programmatically or by click), and again with the node still on screen if the new image fails to load.
Parameters
nodeId
number
Returns
void
onReady?
optionalonReady?: () =>void
Fired once, when the first image is on screen.
Returns
void
walkable?
optionalwalkable?: (from,to) =>boolean
Whether walking from one node to another is possible, e.g. false when a wall stands between them: the floor pointer then targets the nearest walkable node.
Parameters
from
to
Returns
boolean
zoom?
optionalzoom?:boolean
Enable mouse-wheel zoom. Defaults to true.