MeasureEditor(options)

测量工具类,参考测量

new MeasureEditor(options)

Parameters:
Name Type Description
options Object

包含以下参数的对象

Properties
Name Type Attributes Default Description
viewer Viewer

Motor.Viewer实例化对象

callback MeasureResultCallback <optional>

测量结果回调函数,返回距离或者角度值

mode MeasureMode <optional>
MeasureMode.ANGLE

测量模式

style Object <optional>
defaultStyle

线条、点和弧形的样式

Example
//defautStyle的默认值
const defaultStyle={
    x:{
        strokeStyle:'red',
        lineDash:[4],
        lineWidth:2
    },
    y:{
        strokeStyle:'green',
        lineDash:[4],
        lineWidth:2
    },
    z:{
        strokeStyle:'blue',
        lineDash:[4],
        lineWidth:2
    },
    distance:{
        strokeStyle:'orange',
        lineDash:[4],
        lineWidth:2
    },
    point:{
        radius:5,
        fillStyle:'orange'
    },
    arc:{
        strokeStyle:'orange',
        lineDash:[],
        lineWidth:2
    }
};

Members

mode :MeasureMode

获取或设置测量模式