Example:
const collection = new BufferPolylineCollection({
primitiveCountMax: 1024,
vertexCountMax: 4096,
});
const polyline = new BufferPolyline();
// Create a new polyline, temporarily bound to 'polyline' local variable.
collection.add({
positions: new Float64Array([ ... ]),
color: Color.WHITE,
}, polyline);
// Iterate over all polylines in collection, temporarily binding 'polyline'
// local variable to each, and updating polyline color.
for (let i = 0; i < collection.primitiveCount; i++) {
collection.get(i, polyline);
polyline.setColor(Color.RED);
}
Experimental
This feature is not final and is subject to change without Cesium's standard deprecation policy.
See:
Extends
Methods
add(options, result) → BufferPolyline
在收藏中添加一条新的多线,并附带指定的选项。 A级
BufferPolyline instance is linked to the new polyline, using
如果给出了“ 结果” 参数, 或者没有给出新实例 。 对重复
调用,更喜欢重用单个缓冲Polyline实例而不是
每次通话都分配一个新实例.
| Name | Type | Description |
|---|---|---|
options |
BufferPolylineOptions | |
result |
BufferPolyline |