ViewerGraphLayer
Class: ViewerGraphLayer
Draws a WemapViewer's 360° image graph on a WemapMap: the edges
as lines and the nodes as circles, filtered to the map's current indoor level.
Clicking an edge or node navigates the viewer to the nearest node (unless
interactive is false), and the node the viewer is currently showing is
highlighted.
const graph = new ViewerGraphLayer(map, viewer);
await graph.load();
// ...
graph.destroy();
WemapMap.remove() does not destroy this layer — call destroy.
Constructors
Constructor
new ViewerGraphLayer(
wemapMap,viewer,options?):ViewerGraphLayer
Parameters
wemapMap
viewer
options?
Returns
ViewerGraphLayer
Methods
destroy()
destroy():
void
Remove layers, source and listeners. Idempotent.
Returns
void
load()
load():
Promise<void>
Load the viewer's image graph and draw it. Works before or after
viewer.open(): it loads the graph itself (viewer.loadGraph()), without
opening a photo.
Returns
Promise<void>