new SketchRotateSectorDrawTool(options)
旋转轨迹环绘制工具。
用于在三维草图编辑中创建 X/Y/Z 方向的旋转控制环,并在拖拽控制环时向父级绘制工具派发旋转角度或高度变化事件。 该工具通常由模型、球体、规则实体或 Cesium 变换工具内部创建,不作为独立业务图形使用。
| Name | Type | Default | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | {} |
可选
构造参数。
|
Extends
Members
-
arcTypeNumber
-
弧线类型
-
editOptionObject
-
草图选中编辑配置项
-
elevationInfoSketchStyle
-
图形高程模式参数
-
extensionOptionsObject
-
草图编辑的扩展属性,可以通过该属性传入草图编辑额外需要的参数
-
layerGraphicsLayer
-
草图图层
-
sketchStageSketchStage
-
草图绘图形集合
-
sketchStyleSketchStyle
-
草图符号
-
typeString
-
草图工具类型名
-
undoRedoManagerString
-
草图撤销回退管理器
-
地图视图
Methods
-
inherited _getProjectionOnRotatedAxes(rotationAngle, startPoint, endPoint){Object}
sketchEditor/base/drawTools/SketchBaseDrawTool.js, line 3294 -
计算点2到中心点在旋转后坐标轴上的投影距离
Name Type Description rotationAnglenumber 旋转角度(弧度)
startPointObject 起始点(中心点),格式 { x, y }
endPointObject 终止点(目标点),格式 { x, y }
Returns:
Type Description Object 返回 { x, y } 表示在旋转后坐标系中的投影距离 -
inherited _getProjectionOnRotatedAxes1(rotation, startPoint, endPoint){Object}
sketchEditor/base/drawTools/SketchBaseDrawTool.js, line 3331 -
计算点到坐标轴方向的分量
Name Type Description rotationnumber 坐标系旋转角度(弧度,正值为顺时针)
startPointObject 起点(原点)像素坐标 {x, y}
endPointObject 终点(P点)像素坐标 {x, y}
Returns:
Type Description Object 返回 {x, y} - 点在旋转后坐标系的x轴和y轴方向上的分量距离 -
inherited _getSphereCenterPoint()
sketchEditor/base/drawTools/SketchBaseDrawTool.js, line 4041 -
获取立体几何的中心点
-
inherited _getSphereParams()
sketchEditor/base/drawTools/SketchBaseDrawTool.js, line 3997 -
获取立体几何的外包球中心点、半径、半径单位等属性
-
inherited _rotatePoint(angleDegrees, P, Q){Object}
sketchEditor/base/drawTools/SketchBaseDrawTool.js, line 3384 -
计算点Q绕点P旋转后的坐标
Name Type Description angleDegreesnumber 旋转角度(度),逆时针为正,顺时针为负
PObject 旋转中心点坐标
QObject 旋转前Q点坐标
Returns:
Type Description Object Q点旋转后的坐标 -
addFeature(point, radiusParams, sketchStyle, attributes, layer){void}
sketchEditor/base/drawTools/SketchRotateSectorDrawTool.js, line 80 -
添加旋转控制环要素。
根据控制中心点、半径和方向创建轨迹环要素,并添加到目标辅助图层。
Name Type Default Description pointPoint | Array.<Number> 控制环中心点。
radiusParamsObject {} 可选 控制环半径参数。
Name Type Default Description radiusNumber 100000 可选 控制环内半径。
radiusUnitRadiusUnit 可选 半径单位。
sketchStyleSketchStyle | SketchStyle3D 符号样式参数。当前实现使用实例的旋转环样式。
attributesObject 可选 写入控制环要素的属性对象。
layerGraphicsLayer 可选 控制环添加到的目标图层。
Returns:
Type Description void -
addFeatureByGeometry(geometry, sketchStyle, attributes, layer){void}
sketchEditor/base/drawTools/SketchRotateSectorDrawTool.js, line 109 -
通过已有几何添加旋转控制图形。
该入口用于兼容统一绘制工具接口,直接使用传入几何和点符号样式创建辅助要素。
Name Type Description geometryGeometry 控制图形几何。
sketchStyleSketchStyle | SketchStyle3D 符号样式。
attributesObject 可选 写入控制图形的属性对象。
layerGraphicsLayer 可选 控制图形添加到的目标图层。
Returns:
Type Description void -
inherited addVertex(point, index)
sketchEditor/base/drawTools/SketchBaseDrawTool.js, line 1954 -
当前草图图形中插入新的顶点
Name Type Description pointPoint 新增/插入顶点
indexNumber 新增点的索引值,索引值从0开始
-
drawFeature(){void}
sketchEditor/base/drawTools/SketchRotateSectorDrawTool.js, line 70 -
旋转控制环不支持独立鼠标绘制。
控制环由父级编辑工具通过
addFeature创建,保留该方法是为了满足绘制工具统一接口。Returns:
Type Description void -
inherited getDistanceByPixel(pixel){Number}
sketchEditor/base/drawTools/SketchBaseDrawTool.js, line 1975 -
根据像素单位获取距离
Name Type Description pixelNumber 编辑状态码
Returns:
Type Description Number 距离 -
inherited getMidScaleCoordinates(coordinates, direction, extent, startPoint, movePoint, oriCoordinates){Number}
sketchEditor/base/drawTools/SketchBaseDrawTool.js, line 2106 -
获取图形通过四个中点缩放后的坐标
Name Type Description coordinatesArray 坐标数组
directionString 方向
extentExtent 图形extent范围
startPointPoint 移动前的点
movePointPoint 移动后的点
oriCoordinatesPoint 图形原始坐标
Returns:
Type Description Number 缩放后的坐标 -
inherited getPanCoordinates(coordinates, deltaX, deltaY, pointType, extent){Number}
sketchEditor/base/drawTools/SketchBaseDrawTool.js, line 1993 -
获取平移后的坐标
Name Type Description coordinatesArray 坐标数组
deltaXNumber x轴偏移量
deltaYNumber y轴偏移量
pointTypeNumber 点属性类型
extentNumber 点所在范围
Returns:
Type Description Number 平移后的坐标 -
inherited getScaleCoordinates(coordinates, direction, extent, startPoint, movePoint, oriCoordinates){Number}
sketchEditor/base/drawTools/SketchBaseDrawTool.js, line 2023 -
获取图形通过四个顶点缩放后的坐标
Name Type Description coordinatesArray 坐标数组
directionString 方向
extentExtent 图形extent范围
startPointPoint 移动前的点
movePointPoint 移动后的点
oriCoordinatesPoint 图形原始坐标
Returns:
Type Description Number 缩放后的坐标 -
hitTestFeature(feature, event, options){void}
sketchEditor/base/drawTools/SketchRotateSectorDrawTool.js, line 202 -
拾取旋转控制环并进入旋转交互。
当父级处于旋转或顶点编辑状态时,拖拽控制环会派发
rotate、heightChange或positionHeightChange事件。Name Type Description featureFeature 被拾取的控制环要素。
eventObject 拾取事件参数。
optionsObject 拾取附加参数。
Returns:
Type Description void -
inherited removeDrawTool()
sketchEditor/base/drawTools/SketchBaseDrawTool.js, line 1922 -
清除草图绘制工具
-
inherited removeVertex(index)
sketchEditor/base/drawTools/SketchBaseDrawTool.js, line 1967 -
移除草图图形的某个顶点
Name Type Description indexNumber 需移除的顶点的索引值,索引值从0开始
-
selectFeature(feature, event){void}
sketchEditor/base/drawTools/SketchRotateSectorDrawTool.js, line 215 -
选中旋转控制环要素。
当前控制环没有独立选中态,方法保留用于统一绘制工具接口。
Name Type Description featureFeature 被选中的控制环要素。
eventObject 选中事件参数。
Returns:
Type Description void -
inherited selectFeatureRotate(feature)
sketchEditor/base/drawTools/SketchBaseDrawTool.js, line 3814 -
选中feature图形旋转
Name Type Description featureFeature 被选中feature对象
-
inherited setSketchStyle(sketchStyle)
sketchEditor/base/drawTools/SketchBaseDrawTool.js, line 1742 -
设置草图样式
Name Type Description sketchStyleSketchStyle -
inherited setSnapAndReferGeometries(geometries)
sketchEditor/base/drawTools/SketchBaseDrawTool.js, line 2874 -
设置捕获和线造区边界参考几何图形集合
Name Type Description geometriesArray.<Geometry> 可选,几何图形集合。
-
inherited setSnapFeatures(features)
sketchEditor/base/drawTools/SketchBaseDrawTool.js, line 3808 -
设置捕获和线造区边界参考几何图形集合
Name Type Description featuresArray.<Geometry> 可选,几何图形集合。
-
inherited start()
sketchEditor/base/drawTools/SketchBaseDrawTool.js, line 176 -
开始绘制草图
-
inherited stop()
sketchEditor/base/drawTools/SketchBaseDrawTool.js, line 189 -
停止绘制草图
-
inherited updateFeature(point, feature)
sketchEditor/base/drawTools/SketchBaseDrawTool.js, line 1900 -
更新feature
Name Type Description pointPoint 待更新的位置
featureFeature 被更新的feature
-
inherited updateVertex(point, index)
sketchEditor/base/drawTools/SketchBaseDrawTool.js, line 1961 -
更新当前草图图形的某个顶点
Name Type Description pointPoint 新的顶点
indexNumber 需更新的顶点的索引值,索引值从0开始