| Name | Type | Description |
|---|---|---|
options |
CircleVectorPrimitiveOptions |
Examples:
const collection = new Cesium.BufferPointCollection();
collection.add({ position: Cesium.Cartesian3.fromDegrees(-75.16, 39.95) });
viewer.scene.primitives.add(
new Cesium.CircleVectorPrimitive({
collection,
radius: 8,
color: Cesium.Color.ORANGE,
outlineColor: Cesium.Color.WHITE,
outlineWidth: 2,
}),
);
const properties = [{ population: 12000 }, { population: 450000 }];
viewer.scene.primitives.add(
new Cesium.CircleVectorPrimitive({
collection,
radius: (point) => Math.sqrt(properties[point.featureId].population) / 50,
color: (point) =>
properties[point.featureId].population > 100000
? Cesium.Color.RED
: Cesium.Color.GRAY,
filter: (point) => properties[point.featureId].population > 1000,
}),
);
Experimental
This feature is not final and is subject to change without Cesium's standard deprecation policy.
Extends
Members
blendOption : BlendOption
Determines how the circles are blended with the scene. Must be
BlendOption.OPAQUE or BlendOption.TRANSLUCENT.
-
Default Value:
BlendOption.TRANSLUCENT
readonly collection : BufferPointCollection
The points drawn by the vector primitive. The vector primitive does not own
the collection; destroying it leaves the collection intact.
- Inherited From:
color : Color|function
Fill color of each circle.
-
Default Value:
Color.WHITE
Whether each point is drawn. When undefined, every point is drawn. Points
hidden with
BufferPrimitive#show are never drawn.
outlineColor : Color|function
Outline color of each circle.
-
Default Value:
Color.BLACK
Outline width of each circle, in pixels.
-
Default Value:
0.0
Radius of each circle, in pixels.
-
Default Value:
5.0
Whether the vector primitive is drawn.
- Inherited From:
- Default Value:
true
Methods
Destroys the GPU resources of the vector primitive. The collection is not
destroyed.
- Inherited From:
Returns true if this object was destroyed; otherwise, false.
Returns:
True if this object was destroyed; otherwise, false.
- Inherited From:
Marks the visual properties as dirty, so per-primitive callbacks are
evaluated again on the next frame. Callbacks are otherwise evaluated only
when a primitive changes or a property is assigned, so call this after
changing data that a callback reads.
- Inherited From:
