MeasureLines class

A tool to measure the total length of several un-connected lines. Users can reset the current measurement by clicking the mouse right button. Users can press "Esc/Enter" to stop the current measurement.

Signature:

export default class MeasureLines extends Measure 

Extends: Measure

Remarks

Notice that we can not enable multiple measure tools at the same time. Before a new tool being enabled, the old tool must be disabled first.

Moreover, the measurement tools require mouse input and mouse input should be added to the viewer before the tool.

Example

var ruler = new Modelo.View.Tool.MeasureLines(viewer);
viewer.addTool(ruler);

Constructors

ConstructorDescription
(constructor)(viewer)Create the tool.

Methods

MethodDescription
destory()Delete all resources in the measure tool
getPerimeter()Get the current measured length.
setEnabled(enabled)Enable the tool.