GroundPolylineGeometry

new Cesium.GroundPolylineGeometry(options)

地形或三维平铺上多段线的描述。仅用于GroundPolylinePrimitive
Name Type Description
options Object 具有以下属性的选项:
Name Type Default Description
positions Array.<Cartesian3> 定义多段线点的Cartesian3数组。椭球体上方的高度将被忽略。
width Number 1.0 optional 以像素为单位的屏幕空间宽度。
granularity Number 9999.0 optional 用于插值的距离间隔(以米为单位)选项.点. 默认为9999.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

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

Methods

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

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

static Cesium.GroundPolylineGeometry.unpack(array, startingIndex, result)

从压缩数组检索实例。
Name Type Default Description
array Array.<Number> 压缩数组。
startingIndex Number 0 optional 要解包的元素的起始索引。
result PolygonGeometry optional 要将结果存储到其中的对象。