The ViewerPolylineAPI provides basic functionalities to create and visualize Polylines.
Example
// Get an instance of the ContextAPI & ViewerAPI consttheContext : ContextAPI = webvis.getContext(), theViewer : ViewerAPI = theContext.getViewer();
// Create a list of 3D positions which defines the Polyline constlinePositions : number[] = [ 0, 0, 0, 1, 0, 0, 2, 0, 0 ];
// Create a red Polyline with the given linePositions and a width of 6 pixels constpolylineId : number = theViewer.createPolyline( linePositions , { color: [1, 0, 0, 1], width:6 });
// Change the color of the Polyline to green theViewer.changePolyline( polylineId, { color: [0, 1, 0, 1] };
// Removes the Polyline theViewer.removePolyline(polylineId)
The ViewerPolylineAPI provides basic functionalities to create and visualize Polylines.
Example