Singleton constructor. If already instantiated, returns the same instance.
The toggling/activation button for this measurement state.
Required/precondition states.
States that are deactivated when this state activates.
Name/identifier for the state.
States that should be restored when this state ends.
Activates height measurement mode, initializes a HeightMeasurement, cleans up unfinished measurements, sets up state and event handlers, and opens info window.
Application instance.
Sets up the main "cancel current measurement" event handler and disables camera change notifications.
The main application instance.
The active measurement instance.
Ends this height measurement mode, finalizes and lists the measurement if finished, or cancels and deletes if not. Unbinds UI/button and closes window.
Application instance.
Always true.
(Customizable) Remove event handlers set up for this state.
(Customizable) Set up any custom event handlers for this state.
Ends the measurement state: removes button event listeners, clears global measurement flag, and resets camera-change flag after 1 second.
Always true on proper termination.
HeightMeasurementState – Application UI state for interactive height measurements.
Ensures only one instance active (singleton pattern). Integrates with Cesium/app infrastructure, manages input tool activation, measurement instance lifecycle, custom event handlers, and UI updates. Handles finalizing or canceling the active height measurement in response to user actions.
Param: button
UI button used to activate this measure state.
Example