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