3D-City Model
    Preparing search index...

    Represents a basic drawing consisting of interactive 3D points (Cartesian coordinates).

    Other drawing classes may extend this class to add more complex geometry.

    Manages a set of points (via PointSet3D), supports callbacks for point interaction, controls visibility, completion, and destruction, and exposes key properties for external use.

    The main application/controller context.

    Configuration options.

    Unique identifier (default: uuidv4).

    Initial Array of point coordinates.

    Maximum number of points allowed.

    Point color (default: MEASUREMENT_POINT_COLOR).

    Whether to create the first point instantly.

    Whether to use PointSet3D for management.

    Called on any point move.

    Called when a point is set.

    Called after drawing is finished.

    const drawing = new Drawing(viewer, {
    id: "draw1",
    maxPoints: 3,
    color: Cesium.Color.RED,
    onMoveCallback: () => { ... },
    onSetCallback: () => { ... }
    });

    drawing.onFinish(() => {
    console.log("Drawing finished!", drawing.cartesians);
    });

    Hierarchy (View Summary)

    Index

    Constructors

    • Create a new drawing.

      Parameters

      • app: any

        Application context (e.g. Cesium Viewer).

      • Optionaloptions: object = {}

        Drawing configuration (see class doc).

      Returns Drawing

    Properties

    app: any
    destroyed: undefined | boolean
    id: any
    onFinishCallback: any
    onMoveCallback: any
    onSetCallback: any
    point: undefined | PointEntity
    pointSet: PointSet3D

    Accessors

    Methods

    • Add another interactive 3D point to the drawing. Triggers relevant callbacks when placement is complete or limit is reached.

      Returns void

    • Cancel this drawing (destroys if not already finished).

      Returns boolean

      True if canceled, false if already finished.

    • Clean up resources and destroy the drawing. Called on cancel or when window is removed.

      Returns null

    • Trigger drawing finalization (called internally). Removes last point if no maxPoints, sets finished to true.

      Returns void