Methods
(async, static) createObj() → {Promise.<SketchStyle>}
构造一个新的SketchStyle对象
- Source:
Returns:
- Type
- Promise.<SketchStyle>
(async, static) getFillStyle() → {Promise.<FillStyle>}
获取区样式
- Source:
Returns:
- Type
- Promise.<FillStyle>
(async, static) getLineStyle() → {Promise.<LineStyle>}
获取线样式
- Source:
Returns:
- Type
- Promise.<LineStyle>
(async, static) getMeasureType() → {Number}
获取量算类型
- Source:
Returns:
量算类型(int类型的Number,例:1-MeasureType.PLANAR)
- Type
- Number
(async, static) getMidVertexStyle() → {Promise.<PointStyle>}
获取中点样式
- Source:
Returns:
- Type
- Promise.<PointStyle>
(async, static) getReferenceLineStyle() → {Promise.<LineStyle>}
获取参考线样式(开启放大镜后的牵引线)
- Source:
Returns:
- Type
- Promise.<LineStyle>
(async, static) getReferenceVertexStyle() → {Promise.<PointStyle>}
获取参考点样式(放大镜内的点,标识手势点,也可用于捕捉)
- Source:
Returns:
- Type
- Promise.<PointStyle>
(async, static) getSelectedMidVertexStyle() → {Promise.<PointStyle>}
获取被选中的中点样式
- Source:
Returns:
- Type
- Promise.<PointStyle>
(async, static) getSelectedVertexStyle() → {Promise.<PointStyle>}
获取被选中的顶点样式
- Source:
Returns:
- Type
- Promise.<PointStyle>
(async, static) getTextStyle() → {Promise.<TextStyle>}
获取文本样式(标记线段长度、顶点坐标、区面积)
- Source:
Returns:
- Type
- Promise.<TextStyle>
(async, static) getVertexStyle() → {Promise.<PointStyle>}
获取顶点样式
- Source:
Returns:
- Type
- Promise.<PointStyle>
(async, static) isShowArea() → {boolean}
获取是否显示面积
- Source:
Returns:
- Type
- boolean
(async, static) isShowSegmentLength() → {boolean}
获取是否显示距离
- Source:
Returns:
- Type
- boolean
(async, static) isShowVertexCoord() → {boolean}
是否显示顶点坐标
- Source:
Returns:
- Type
- boolean
(async, static) isVibrationEnabled() → {boolean}
获取是否开启震动
- Source:
Returns:
- Type
- boolean
(async, static) setFillStyle(fillStyle) → {Promise.<Void>}
设置区样式
Parameters:
| Name | Type | Description |
|---|---|---|
fillStyle |
Object | (FillStyle类型的Object) |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setLineStyle(lineStyle) → {Promise.<Void>}
设置线样式
Parameters:
| Name | Type | Description |
|---|---|---|
lineStyle |
Object | 线样式 (LineStyle类型的Object) |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setMeasureType(measureType) → {Promise.<Void>}
设置量算类型
Parameters:
| Name | Type | Description |
|---|---|---|
measureType |
Number | 量算类型(int类型的Number,例:1-MeasureType.PLANAR) |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setMidVertexStyle(midVertexPointStyle) → {Promise.<Void>}
设置中点样式
Parameters:
| Name | Type | Description |
|---|---|---|
midVertexPointStyle |
Object | 中点样式(PointStyle类型的Object) |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setReferenceLineStyle(lineStyle) → {Promise.<Void>}
设置参考线样式(开启放大镜后的牵引线)
Parameters:
| Name | Type | Description |
|---|---|---|
lineStyle |
Object | (LineStyle类型的Object) |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setReferenceVertexStyle(referenceVertexPointStyle) → {Promise.<Void>}
设置参考点样式(放大镜内的点,标识手势点,也可用于捕捉)
Parameters:
| Name | Type | Description |
|---|---|---|
referenceVertexPointStyle |
Object | 参考点样式(PointStyle类型的Object) |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setSelectedMidVertexStyle(selectedMidVertexPointStyle) → {Promise.<Void>}
设置被选中的中点样式
Parameters:
| Name | Type | Description |
|---|---|---|
selectedMidVertexPointStyle |
Object | 被选中的中点样式(PointStyle类型的Object) |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setSelectedVertexStyle(selectedVertexPointStyle) → {Promise.<Void>}
设置被选中的顶点样式
Parameters:
| Name | Type | Description |
|---|---|---|
selectedVertexPointStyle |
Object | 被选中的顶点样式(PointStyle类型的Object) |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setShowArea(isShowArea) → {Promise.<Void>}
设置是否显示面积
可通过设置量算类型来控制显示的面积为图面面积还实地面积,显示实地面积时单位为平方米
显示实地面积时,需要为SketchEditor设置空间参考系。
Parameters:
| Name | Type | Description |
|---|---|---|
isShowArea |
boolean | 是否显示面积 |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setShowSegmentLength(isShowSegmentLength) → {Promise.<Void>}
设置是否显示距离
可通过设置量算类型来控制显示的距离为图面距离还实地距离,显示实地距离时单位为米
显示实地距离时,需要为SketchEditor设置空间参考系。
Parameters:
| Name | Type | Description |
|---|---|---|
isShowSegmentLength |
boolean | 是否显示距离 |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setShowVertexCoord(isShowVertexCoord) → {Promise.<Void>}
设置是否显示顶点坐标
Parameters:
| Name | Type | Description |
|---|---|---|
isShowVertexCoord |
boolean | 是否显示顶点坐标 |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setTextStyle(textStyle) → {Promise.<Void>}
设置文本样式
Parameters:
| Name | Type | Description |
|---|---|---|
textStyle |
Object | 文本样式(TextStyle类型的Object) |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setVertexStyle(vertexPointStyle) → {Promise.<Void>}
设置顶点样式
Parameters:
| Name | Type | Description |
|---|---|---|
vertexPointStyle |
Object | 顶点样式(PointStyle类型的Object) |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setVibrationEnabled(isVibrationEnabled) → {Promise.<Void>}
设置是否开启震动
Parameters:
| Name | Type | Description |
|---|---|---|
isVibrationEnabled |
boolean | 是否开启震动,true:开启;false:不开启.默认开启. |
- Source:
Returns:
- Type
- Promise.<Void>