- The options object takes the following properties
- {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The 4x4 transformation matrix that transforms each polyline from model to world coordinates.
- {Boolean} [options.debugShowBoundingVolume=false] For debugging only. Determines if this primitive's commands' bounding spheres are shown.
performance For best performance, prefer a few collections, each with many polylines, to
many collections with only a few polylines each. Organize collections so that polylines
with the same update frequency are in the same collection, i.e., polylines that do not
change should be in one collection; polylines that change every frame should be in another
collection; and so on.
A renderable collection of polylines.
Example polylines
Polylines are added and removed from the collection using PolylineCollection#add and PolylineCollection#remove
alias PolylineCollection
- The options object takes the following properties - {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The 4x4 transformation matrix that transforms each polyline from model to world coordinates. - {Boolean} [options.debugShowBoundingVolume=false] For debugging only. Determines if this primitive's commands' bounding spheres are shown.
performance For best performance, prefer a few collections, each with many polylines, to many collections with only a few polylines each. Organize collections so that polylines with the same update frequency are in the same collection, i.e., polylines that do not change should be in one collection; polylines that change every frame should be in another collection; and so on.
// Create a polyline collection with two polylines var polylines = new Cesium.PolylineCollection(); polylines.add({ positions : Cesium.Cartesian3.fromDegreesArray([ -75.10, 39.57, -77.02, 38.53, -80.50, 35.14, -80.12, 25.46]), width : 2 }); polylines.add({ positions : Cesium.Cartesian3.fromDegreesArray([ -73.10, 37.57, -75.02, 36.53, -78.50, 33.14, -78.12, 23.46]), width : 4 });
LabelCollection
Polyline
PolylineCollection#remove
PolylineCollection#add