地形或 3D 图块上折线的描述。仅可与 A description of a polyline on terrain or 3D Tiles. Only to be used with
GroundPolylinePrimitive.
| 名称 Name | 类型 Type | 说明 Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
具有以下属性的选项: Options with the following properties:
|
抛出: Throws:
-
DeveloperError :至少需要两个位置。 : At least two positions are required.
示例: Example:
const positions = Cesium.Cartesian3.fromDegreesArray([
-112.1340164450331, 36.05494287836128,
-112.08821010582645, 36.097804071380715,
-112.13296079730024, 36.168769146801104
]);
const geometry = new Cesium.GroundPolylineGeometry({
positions : positions
});
另见: See:
成员 Members
折线必须遵循的路径类型。有效选项是 The type of path the polyline must follow. Valid options are
ArcType.GEODESIC and ArcType.RHUMB.
-
默认值: Default Value:
ArcType.GEODESIC
用于插值 options.points 的距离间隔。零表示没有插值。默认值 9999.0 允许 32 位浮点达到厘米精度。 The distance interval used for interpolating options.points. Zero indicates no interpolation. Default of 9999.0 allows centimeter accuracy with 32 bit floating point.
-
默认值: Default Value:
9999.0
在几何体创建过程中是否会在最后一条线和第一条线位置之间添加一条线段以使该多段线成为一个循环。如果几何体有两个位置,则该参数将被忽略。 Whether during geometry creation a line segment will be added between the last and first line positions to make this Polyline a loop. If the geometry has two positions this parameter will be ignored.
-
默认值: Default Value:
false
屏幕空间宽度(以像素为单位)。 The screen space width in pixels.
方法 Methods
将提供的实例存储到提供的数组中。 Stores the provided instance into the provided array.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
value |
PolygonGeometry | 包装的价值。 The value to pack. | |
array |
Array.<number> | 要打包到的数组。 The array to pack into. | |
startingIndex |
number |
0
|
可选 optional 开始打包元素的数组索引。 The index into the array at which to start packing the elements. |
返回: Returns:
被打包成的数组 The array that was packed into
从打包数组中检索实例。 Retrieves an instance from a packed array.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
array |
Array.<number> | 打包的数组。 The packed array. | |
startingIndex |
number |
0
|
可选 optional 要解包的元素的起始索引。 The starting index of the element to be unpacked. |
result |
PolygonGeometry | 可选 optional 用于存储结果的对象。 The object into which to store the result. |
