-
dragShape(positionOld, positionNew)
-
直接拖动shape
Name |
Type |
Description |
positionOld |
Position
|
旧位置坐标 position = {longitude: 180, latitude: 90} |
positionNew |
Position
|
新位置坐标 |
-
drawShape(positionBegin, positionEnd)
-
绘制shape
Name |
Type |
Description |
positionBegin |
Position
|
起点坐标 position = {longitude: 180, latitude: 90} |
positionEnd |
Position
|
终点坐标 |
-
abstractexportOptions() → Object
-
获取ShapeDrawer的导出附加信息,即该Drawer的特有参数,用于导入时恢复现场
Returns:
返回自定义json对象,默认undefined
-
getAllShape(length, width, height) → Array.<Array.<Position>>
-
获取所有形状(0:外环线;1:锚点控制线;2:旋转控制线;3:内环线等)
Name |
Type |
Description |
length |
Number
|
形状在x方向的长度 |
width |
Number
|
形状在y方向的长度 |
height |
Number
|
形状在z方向的高度 |
Returns:
返回所有形状点序列 position = {longitude: 180, latitude: 90, height: 50}
-
getAnchors(length, width, height) → Array.<Position>
-
获取形状控制锚点序列
Name |
Type |
Description |
length |
Number
|
形状的长度 |
width |
Number
|
形状的宽度 |
height |
Number
|
形状在z方向的高度 |
Returns:
锚点数组 position = {longitude: 180, latitude: 90}
-
getBoundBox(length, width, height) → Array.<Position>
-
获取shape边框(首尾相连)
Name |
Type |
Description |
length |
Number
|
形状的长度 |
width |
Number
|
形状的宽度 |
height |
Number
|
形状在z方向的高度 |
Returns:
点数组 position = {longitude: 180, latitude: 90}
-
getChangeStyle() → Number
-
返回变化类型(1:位置;2:形状;4:旋转)
Returns:
返回变化类型之和
-
getLinkLine(length, width, height) → Array.<Position>
-
获取旋转控制点和边框的连接线
Name |
Type |
Description |
length |
Number
|
形状的长度 |
width |
Number
|
形状的宽度 |
height |
Number
|
形状在z方向的高度 |
Returns:
线段端点数组 position = {longitude: 180, latitude: 90}
-
getPositionss() → Array.<Array.<Position>>
-
返回绘图所需要的点集
Returns:
点集 position = {longitude: 180, latitude: 90}
-
getRotateCP(length, width, height) → Position
-
获取旋转控制点坐标
Name |
Type |
Description |
length |
Number
|
形状的长度 |
width |
Number
|
形状的宽度 |
height |
Number
|
形状在z方向的高度 |
Returns:
点坐标 position = {longitude: 180, latitude: 90}
-
getShape(length, width, height)
-
以形状中心为原点,给定长度,绘制形状,以正北为y正轴,正东为x正轴,垂直屏幕向外为z正轴(如果需要)
Name |
Type |
Description |
length |
Number
|
形状在x方向的长度 |
width |
Number
|
形状在y方向的长度 |
height |
Number
|
形状在z方向的高度 |
-
getShapeEntityPosition() → Object
-
获取形状的所有点坐标用于画图
Returns:
返回面的外部区域和孔区域坐标
-
getShapeInnerRing(length, width, height)
-
获取shape的内环线
Name |
Type |
Description |
length |
Number
|
形状在x方向的长度 |
width |
Number
|
形状在y方向的长度 |
height |
Number
|
形状在z方向的高度 |
-
abstractimportOptions(options)
-
设置ShapeDrawer的导入附加信息,即该Drawer的特有参数,用于恢复现场
Name |
Type |
Description |
options |
Object
|
导出时的自定义json对象 |
-
resizeAnchor(index, position)
-
拖动锚点改变shape尺寸
Name |
Type |
Description |
index |
Number
|
拖动锚点的序号 |
position |
Position
|
新位置坐标 position = {longitude: 180, latitude: 90} |
-
-
拖动锚点旋转shape
Name |
Type |
Description |
position |
Position
|
新位置坐标 position = {longitude: 180, latitude: 90} |