Class: DrawWall

DrawWall(viewer, optionsopt)

new DrawWall(viewer, optionsopt)

DrawWall class for drawing a polygon in a Cesium viewer.
Parameters:
Name Type Attributes Description
viewer Cesium.Viewer The Cesium viewer instance.
options Object <optional>
Options for the drawing tool.
Properties
Name Type Attributes Description
color Cesium.Color <optional>
The color of the polygon.
clampToGround boolean <optional>
Whether to clamp the polygon to the ground.
gap number <optional>
The gap between points in meters.
height number <optional>
The height of the wall in meters.
Source:
Example
const drawWall = new DrawWall(viewer, { color: Cesium.Color.RED });
drawWall.on();
// To disable the drawing tool and clear entities
drawWall.off();

Methods

off() → {void}

Disables the polygon drawing tool. and clears the entities.
Source:
Returns:
Type
void

on() → {boolean|void}

Enables the polygon drawing tool. Left click to add points, right click to finish.
Source:
Returns:
  • Continue - Whether to continue measuring after the first click.
    Type
    boolean
  • Type
    void