Measure

Measurement tool in a 3D visualization. Measure distances by clicking points in the scene and creating a path

Constructor

new Measure(itownsView, layerManager, viewerDiv)

Parameters:
NameTypeDescription
itownsViewPlanarView

managing the 3D scene.

layerManagerLayerManager

handling 3D tiles and intersections.

viewerDivHTMLElement

3D viewer container.

Classes

Measure

Members

clearMeasurePathButton :HTMLButtonElement

Type:
  • HTMLButtonElement

currentMeasurePath :MeasurePath

group :Group

Type:
  • Group

infoPointCloudClicked :HTMLDivElement

Type:
  • HTMLDivElement

layerManager :LayerManager

modeMeasure :boolean

Type:
  • boolean

pathButton :HTMLButtonElement

Type:
  • HTMLButtonElement

Methods

createNewMeasurePath(itownsView) → {MeasurePath}

Creates a new measurement path and adds it to the group.

Parameters:
NameTypeDescription
itownsViewPlanarView

iTowns view instance.

Returns:
  • New instance of the MeasurePath class.
Type: 
MeasurePath

initCallBack(viewerDiv, itownsView)

Initializes event callbacks for handling user interactions. Handles point selection in the scene, toggling measure mode, and clearing the current path.

Parameters:
NameTypeDescription
viewerDivHTMLElement

3D viewer container.

itownsViewPlanarView

iTowns view instance.

leaveMeasureMode(itownsView)

Exits the measurement mode and updates the view accordingly.

Parameters:
NameTypeDescription
itownsViewPlanarView

iTowns view instance.

update(itownsView)

Updates the UI and behavior based on the current measurement mode.

Parameters:
NameTypeDescription
itownsViewPlanarView

iTowns view instance.