AnalyseFactory

AnalyseFactory

分析工厂类

Constructor

new AnalyseFactory(viewer)

分析工厂类

Parameters:
Name Type Description
viewer Cesium.viewer

Methods

cancelCreate()

取消创建

create(type, options) → {Promise}

创建分析对象

Parameters:
Name Type Description
type analyType

分析类型

options Object

options中除了id、type和style分别对应分析ID、绘制皮筋儿类型和绘制时皮筋儿样式外,其余参数都会被传入对应的分析类构造函数

Properties
Name Type Attributes Description
id String <optional>

可选参数 当前分析对象的ID值 要求唯一 可通过ID进行删除/获取分析对象操作 若不传则自动生成ID

type String <optional>

皮筋儿类型 可选参数为 'point'/'line'/'polygon'

style Object <optional>

分析开始前绘制点线面皮筋儿时使用的样式

Properties
Name Type Attributes Description
color String <optional>

皮筋儿颜色 eg: "#29cf34"

opacity Number <optional>

皮筋儿不透明度 范围0~1

clampToGround Boolean <optional>

是否贴地

width Number <optional>

线宽

pixelSize Number <optional>

像素大小

Returns:

analyseID 当前分析对象的ID

Type
Promise

get(uuid) → {Object}

根据ID得到创建的分析对象

Parameters:
Name Type Description
uuid String
Returns:

analyse 分析对象

Type
Object

remove(uuid)

根据ID删除分析对象

Parameters:
Name Type Description
uuid String

分析对象ID

removeAll()

删除所有分析对象