Summary
Methods:
getBBox |
获取拓展几何的三维包围盒 |
getCoordSeqs |
获取折线箭头的坐标序列数组 |
getCtrlPoints |
获取控制点的几何数组 |
getLines |
获取折线箭头中所有的线状几何体对象 |
getType |
获取几何体类型 |
setCtrlPoints |
重新设置折线箭头的控制点。 |
toMultiLine |
将折线箭头转为多线要素 |
Constructor
new PolylineArrow(points)
使用点几何体作为控制点构造折线箭头,控制点数量至少为2,且不可以重复。
Parameters:
Name | Type | Description |
---|---|---|
points |
Array.<module:geom~Point> | 点几何体数组,数组长度小于2或非数组类型时,则抛出构造异常。 |
Throws:
RangeError
|
TypeError
-
数组长度小于2或非数组类型,则抛出构造异常。
Example
let point1 = new hmap.geom.Point(new hmap.basetype.Coordinate(120,30,0));
let point2 = new hmap.geom.Point(new hmap.basetype.Coordinate(121,30,0));
let lineArrowGeom = new hmap.geomext.PolylineArrow([point1,point2]);
Methods
-
getBBox() → {module:basetype~BBox}
-
获取拓展几何的三维包围盒
-
getCoordSeqs() → {Array.<module:basetype~CoordSeq>}
-
获取折线箭头的坐标序列数组
Example
let coordSeqs = lineArrowGeom.getCoordSeqs();
-
getCtrlPoints() → {Array.<module:geom~Point>}
-
获取控制点的几何数组
Example
let points = geomext.getCtrlPoints();
-
getLines() → {Array.<module:geom~Line>}
-
获取折线箭头中所有的线状几何体对象
Example
let lines = lineArrowGeom.getLines();
-
getType() → {String}
-
获取几何体类型
Example
let type = lineArrowGeom.getType();
-
setCtrlPoints(points)
-
重新设置折线箭头的控制点。
Parameters:
Name Type Description points
Array.<module:geom~Point> 点几何体数组,数组长度小于2或非数组类型时,则抛出构造异常。
Throws:
RangeError | TypeError -数组长度小于2或非数组类型,则抛出构造异常。
Example
let point1 = new hmap.geom.Point(new hmap.basetype.Coordinate(121,30,0)); let point2 = new hmap.geom.Point(new hmap.basetype.Coordinate(122,30,0)); lineArrowGeom.setCtrlPoints([point1,point2]);
-
toMultiLine() → {module:geom~MultiLine}
-
将折线箭头转为多线要素
Example
let multiLine = lineArrowGeom.toMultiLine();