GroundPolylineGeometry

new Cesium.GroundPolylineGeometry(options)

对地形或3D Tiles上折线的描述。只能与GroundPolylinePrimitive一起使用。
Name Type Description
options Object 具有以下属性:
Name Type Default Description
positions Array.<Cartesian3> 定义折线点的Cartesian3数组。椭球上的高度将被忽略。
width Number 1.0 optional 屏幕空间宽度(以像素为单位)。
granularity Number 9999.0 optional 距离间隔(以米为单位),用于插值options.points.。默认为9999.0米。0表示没有插值。
loop Boolean false optional 在几何图形创建过程中,是否在最后一行和第一行线位置之间添加线段以使该折线成为循环。
arcType ArcType ArcType.GEODESIC optional 折线段必须遵循的线的类型。有效的选项是ArcType.GEODESICArcType.RHUMB
Throws:
Example:
var positions = Cesium.Cartesian3.fromDegreesArray([
  -112.1340164450331, 36.05494287836128,
  -112.08821010582645, 36.097804071380715,
  -112.13296079730024, 36.168769146801104
]);

var geometry = new Cesium.GroundPolylineGeometry({
  positions : positions
});
See:

Members

折线必须遵循的路径类型。有效的选项是ArcType.GEODESICArcType.RHUMB
Default Value: ArcType.GEODESIC

granularity : Boolean

用于插值options.points的距离间隔。0表示没有插值。 默认为9999.0允许厘米精度和32位浮点数。
Default Value: 9999.0
在几何图形创建过程中,是否在最后一行和第一行线位置之间添加线段以使该折线成为循环。 如果几何图形有两个位置,这个参数将被忽略。
Default Value: false
屏幕空间宽度(以像素为单位)。

Methods

staticCesium.GroundPolylineGeometry.pack(value, array, startingIndex)Array.<Number>

将提供的实例存储到提供的数组中。
Name Type Default Description
value PolygonGeometry 要包装的值。
array Array.<Number> 要被包装到的数组。
startingIndex Number 0 optional 开始包装元素的数组索引。
Returns:
被包装到的数组。

staticCesium.GroundPolylineGeometry.unpack(array, startingIndex, result)PolygonGeometry

从已包装的数组中检索实例。
Name Type Default Description
array Array.<Number> 包装的数组。
startingIndex Number 0 optional 要解包的元素的起始索引。
result PolygonGeometry optional 存储结果的对象。
Returns:
修改后的结果参数或新的PolygonGeometry实例(如果没有提供)。