Methods
(async, static) addStateChangedListener() → {Promise.<Void>}
添加状态改变监听
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) addVertex(x坐标的值, y坐标的值) → {Promise.<Void>}
添加新的顶点(地图坐标)
Parameters:
| Name | Type | Description |
|---|---|---|
x坐标的值 |
Number | |
y坐标的值 |
Number |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) clearGeometry() → {Promise.<Void>}
清除当前的编辑几何
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) createObj(mapView) → {Promise.<SketchEditor>}
构造一个新的SketchEditor对象
Parameters:
| Name | Type | Description |
|---|---|---|
mapView |
Object | 地图视图对象 |
- Source:
Returns:
- Type
- Promise.<SketchEditor>
(async, static) deleteSelectedVertex() → {boolean}
删除当前被选中的顶点
- Source:
Returns:
- Type
- boolean
(async, static) getGeometry() → {Promise.<Geometry>}
获取当前的编辑几何
- Source:
Returns:
成功返回几何对象
- Type
- Promise.<Geometry>
(async, static) getMeasureOption() → {Promise.<MeasureOption>}
获取量算参数选项
- Source:
Returns:
- Type
- Promise.<MeasureOption>
(async, static) getSketchDataType() → {Number}
获取编辑的数据类型
- Source:
Returns:
几何类型(int类型的Number,例:1--SketchDataType.POINT,-1表示获取失败)
- Type
- Number
(async, static) getSketchStyle() → {Promise.<SketchStyle>}
获取草图样式
- Source:
Returns:
- Type
- Promise.<SketchStyle>
(async, static) getSnappingOption() → {Promise.<SnappingOption>}
获取捕捉选项
- Source:
Returns:
- Type
- Promise.<SnappingOption>
(async, static) getSRS() → {Promise.<SRefData>}
获取空间参考系
- Source:
Returns:
- Type
- Promise.<SRefData>
(async, static) isSketchValid() → {boolean}
草图几何是否有效(点几何必须有1个顶点、线必须有2个顶点、区必须有3个顶点)
- Source:
Returns:
- Type
- boolean
(async, static) moveSelectedVertexTo(x坐标的值, y坐标的值) → {boolean}
移动当前被选中的顶点到指定的位置(地图坐标)
Parameters:
| Name | Type | Description |
|---|---|---|
x坐标的值 |
Number | |
y坐标的值 |
Number |
- Source:
Returns:
- Type
- boolean
(async, static) redo() → {boolean}
重做
- Source:
Returns:
true-成功;false-失败
- Type
- boolean
(async, static) removeStateChangedListener() → {Promise.<Void>}
移除状态改变监听
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) replaceGeometry(geometry) → {Promise.<Void>}
替换当前的编辑几何对象
Parameters:
| Name | Type | Description |
|---|---|---|
geometry |
Object | 几何对象 |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setMagnifierOption(magnifierOption) → {Promise.<Void>}
设置地图位置组件
Parameters:
| Name | Type | Description |
|---|---|---|
magnifierOption |
Object | 地图位置组件 |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setMeasureOption(measureOption) → {Promise.<Void>}
设置量算参数选项
Parameters:
| Name | Type | Description |
|---|---|---|
measureOption |
MeasureOption | 量算参数选项 |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setSketchStyle(sketchStyle) → {Promise.<Void>}
设置草图样式
Parameters:
| Name | Type | Description |
|---|---|---|
sketchStyle |
Object | 草图样式(SketchStyle类型的Object) |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setSnappingOption(snappingOption) → {Promise.<Void>}
设置捕捉选项
Parameters:
| Name | Type | Description |
|---|---|---|
snappingOption |
Object | 捕捉选项(SnappingOption类型的Object) |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setSRS(空间参考系) → {Promise.<Void>}
设置编辑数据的空间参考系,用于计算实地距离和面积
Parameters:
| Name | Type | Description |
|---|---|---|
空间参考系 |
SRefData |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) snapping(x坐标的值, y坐标的值) → {Promise.<Dot>}
试图捕捉指定点(地图坐标,返回被捕捉到的点,返回null表示捕捉失败
Parameters:
| Name | Type | Description |
|---|---|---|
x坐标的值 |
Number | |
y坐标的值 |
Number |
- Source:
Returns:
返回null表示捕捉失败
- Type
- Promise.<Dot>
(async, static) start(geometry) → {Promise.<Void>}
开始编辑已有的几何对象
Parameters:
| Name | Type | Description |
|---|---|---|
geometry |
Object | 几何对象 |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) startByType(sketchDataType) → {Promise.<Void>}
依据指定的数据类型开始新的几何编辑
Parameters:
| Name | Type | Description |
|---|---|---|
sketchDataType |
Number | 几何类型(int类型的Number,例:1--SketchDataType.POINT) |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) stop() → {Promise.<Void>}
停止编辑
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) undo() → {boolean}
撤销
- Source:
Returns:
true-成功;false-失败
- Type
- boolean