ContourLine

ContourLine

地形等高线

Constructor

new ContourLine(viewer, optionsopt)

Parameters:
Name Type Attributes Description
viewer Viewer

要分析的场景对象

options Object <optional>

带有以下属性的对象:

Properties
Name Type Attributes Default Description
onStart function <optional>

分析开始的回调

onEnd function <optional>

分析结束的回调

enableContour Boolean <optional>

是否有等高线

contourSpacing Number <optional>
150

等高线间隔

contourWidth Number <optional>
2.0

等高线宽度

positions Array.<Cesium.Cartesian3> <optional>

等高线绘制范围

allScene Boolean <optional>
false

是否全场景绘制等高线

selectedShading 'elevation' | 'slope' | 'none' <optional>
"none"

等高级分析时附加类型

contourColor String <optional>
"#ff0000"

等高线颜色

Methods

clear()

清空数据

destroy()

销毁对象

enableContour(bShowContour)

设置是否显示等高线

Parameters:
Name Type Description
bShowContour Boolean

是否显示等高线

setContourColor(cssColor)

设置等高线颜色

Parameters:
Name Type Description
cssColor String

css格式的颜色,例如"#ff0000"

setContourSpacing(spacing)

设置等高线间隔

Parameters:
Name Type Description
spacing Number

等高线间隔

setContourWidth(width)

设置等高线宽度

Parameters:
Name Type Description
width Number

高线宽度

setSelectedShading(selectedShading)

设置地形渲染类型

Parameters:
Name Type Description
selectedShading 'elevation' | 'slope' | 'none'