3D-City Model
    Preparing search index...

    HeightDrawing – Specialized drawing for visualizing and measuring height between 3 points in 3D.

    Extends Drawing to support 3 interactive points (lowest, middle, highest), auto-adjusts the intermediate point vertically, and displays colored lines for visualization.

    Provides separate properties for controlling point and line color, and manages visibility and destruction for all involved Cesium entities.

    The Cesium or host application instance.

    Optional initial array of Cartesian positions.

    The color used for the points.

    The color for the lines.

    Whether to immediately add the first point on construction.

    Callback when a point is moved.

    Callback when a point is set.

    Callback when drawing is finished.

    const drawing = new HeightDrawing(viewer, {
    pointColor: Cesium.Color.ORANGE,
    lineColor: Cesium.Color.DEEPPINK,
    onFinishCallback: () => { ... }
    });

    // The drawing manages all Cesium entities for the user interactively.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    app: any
    destroyed: undefined | boolean
    id: any
    line: null | Entity[]

    Array of Cesium Entity polylines.

    lines: undefined | any[]
    onFinishCallback: any
    onMoveCallback: any
    onSetCallback: any
    point: undefined | PointEntity
    pointSet: PointSet3D

    Accessors

    • get cartesians(): Cartesian3[]

      Access the current array of point positions.

      Returns Cartesian3[]

    • set cartesians(value: Cartesian3[]): void

      Parameters

      • value: Cartesian3[]

      Returns void

    • get show(): boolean

      Show/hide all points and polylines in the drawing. Middle point is always hidden.

      Returns boolean

    • set show(value: boolean): void

      Visibility of the drawing (true = points shown).

      Parameters

      • value: boolean

      Returns void

    Methods

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

      Returns void

    • Utility to ensure all three points are distinct (applies offset if needed).

      Parameters

      • lowPoint: Cartesian3
      • middlePoint: Cartesian3
      • highPoint: Cartesian3
      • Optionalepsilon: any = ...

      Returns [Cartesian3, Cartesian3, Cartesian3]

    • Render the three colored polyline segments for the height visualization:

      • Low → Middle (yellow, vertical)
      • Middle → High (blue, vertical)
      • Low → High (green, slanted/height diff)

      Returns void