new Cesium.GroundPolylineGeometry(options)

A description of a polyline on terrain or 3D Tiles. Only to be used with GroundPolylinePrimitive.
Name Type Description
options object 下列属性的选项 :
Name Type Default Description
positions Array.<Cartesian3> An array of Cartesian3 defining the polyline's points. Heights above the ellipsoid will be ignored.
width number 1.0 optional 屏幕空间宽度以像素表示.
granularity number 9999.0 optional The distance interval in meters used for interpolating options.points. Defaults to 9999.0 meters. Zero indicates no interpolation.
loop boolean false optional Whether during geometry creation a line segment will be added between the last and first line positions to make this Polyline a loop.
arcType ArcType ArcType.GEODESIC optional The type of line the polyline segments must follow. Valid options are ArcType.GEODESIC and ArcType.RHUMB.
Throws:
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

arcType : ArcType

The type of path the polyline must follow. Valid options are ArcType.GEODESIC and ArcType.RHUMB.
Default Value: ArcType.GEODESIC

granularity : boolean

插值 NT 0 使用的距离间隔. 0表示没有内插. 默认的9999.0允许有32位浮点的厘米精度.
Default Value: 9999.0

loop : boolean

在几何创建过程中,是否会在最后一行位置和第一行位置之间添加一个线段,使这个Polyline成为循环. 如果几何具有两个位置,这个参数将被忽略.
Default Value: false

width : number

屏幕空间宽度以像素表示.

Methods

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

将所提供的实例存储到所提供的数组中.
Name Type Default Description
value PolygonGeometry 包装的价值.
array Array.<number> 装入的阵列.
startingIndex number 0 optional The index into the array at which to start packing the elements.
Returns:
装入的阵列

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

从组合的数组中获取实例 .
Name Type Default Description
array Array.<number> 装填的阵列.
startingIndex number 0 optional The starting index of the element to be unpacked.
result PolygonGeometry optional 存储结果的对象.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.