Skip to main content

ViewerMapSync

wemap-sdk-js


Class: ViewerMapSync

Keeps a WemapMap following a WemapViewer: when the viewer navigates to another node, the map eases to that node's position and switches to its indoor level. If the viewer is already on a node, the map follows it right away, so this can be created before or after viewer.open(). Pairs well with ViewerGraphLayer and ViewerHeadingMarker.

const sync = new ViewerMapSync(map, viewer, { zoom: 20 });
// ...
sync.destroy();

Constructors​

Constructor​

new ViewerMapSync(wemapMap, viewer, options?): ViewerMapSync

Parameters​

wemapMap​

WemapMap

viewer​

WemapViewer

options?​

ViewerMapSyncOptions = {}

Returns​

ViewerMapSync

Methods​

destroy()​

destroy(): void

Stop following. Idempotent.

Returns​

void