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 米。零表示不进行插值。
loop boolean false optional 在创建几何体时,是否将在最后和第一个线位置之间添加线段,使此多线段形成一个环。
arcType ArcType ArcType.GEODESIC optional 多线段段必须遵循的线类型。有效选项为 ArcType.GEODESICArcType.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.GEODESICArcType.RHUMB
Default Value: ArcType.GEODESIC
用于插值 options.points 的距离间隔。零表示不进行插值。 默认值 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 存储结果的对象.
需要帮助?获得答案的最快方法是来自社区和团队 Cesium Forum.