drawPoints
drawPoints(options) → object
Activates an interactive mode for drawing points in the 3D World.
Parameters
Name |
Type |
Description |
||||||||||||||||||||||||||||||||||||||||
options |
Object |
|
Returns
A helper object whose members enable control of the drawing operation. These include:
§ .finish() – finish the drawing
§ .abort() – cancel the drawing operation
§ cancelLastPoint() – cancel the last point drawn
§ .options – override the initial styling set by the options (style) parameter
Example
The following example activates an interactive mode for drawing points. Multiple points can be added, until right-clicking to finish. For more information, see an online interactive tutorial with code editor.
TerraExplorer.drawing.drawPoints({AltitudeMethod: TerraExplorer.AltitudeMethod.RELATIVE_TO_MODEL, Altitude: 0.1, onFinish: onFinishDrawing});
function onFinishDrawing(points){
points.forEach(function(p){
TerraExplorer.objects.point.create("Point",p, {backgroundColor:Cesium.Color.BLACK, color: Cesium.Color.RED, outlineColor:Cesium.Color.ORANGE, outlineWidth:5, pixelSize:6, heightReference: Cesium.HeightReference.CLAMP_TO_GROUND});
});
}