Cesium3DTilePointFeature
A point feature of a Cesium3DTileset.
Provides access to a feature's properties stored in the tile's batch table, as well as the ability to show/hide a feature and change its point properties
Modifications to a Cesium3DTilePointFeature
object have the lifetime of the tile's content. If the tile's content is unloaded, e.g., due to it going out of view and needing to free space in the cache for visible tiles, listen to the Cesium3DTileset.tileUnload event to save any modifications. Also listen to the Cesium3DTileset.tileVisible event to reapply any modifications.
Do not construct this directly. Access it through Cesium3DTileContent.getFeature or picking using Scene.pick and Scene.pickPosition.
// On mouse over, display all the properties for a feature in the console log.
handler.setInputAction(function(movement) {
const feature = scene.pick(movement.endPosition);
if (feature instanceof Cesium3DTilePointFeature) {
const propertyIds = feature.getPropertyIds();
const length = propertyIds.length;
for (let i = 0; i < length; ++i) {
const propertyId = propertyIds[i];
console.log(`{propertyId}: ${feature.getProperty(propertyId)}`);
}
}
}, ScreenSpaceEventType.MOUSE_MOVE);
See also
Properties
Gets or sets the color for the anchor line.
Gets or sets whether the anchor line is displayed.
Gets or sets the background color of the text for this feature.
Gets or sets whether to display the background of the text for this feature.
Gets or sets the background padding of the text for this feature.
Gets or sets the distance where depth testing will be disabled.
Gets or sets the condition specifying at what distance from the camera that this feature will be displayed.
Gets or sets the height offset in meters of this feature.
Gets or sets the horizontal origin of this point, which determines if the point is to the left, center, or right of its anchor position.
Gets or sets the label color of this feature.
Gets or sets the horizontal origin of this point's text, which determines if the point's text is to the left, center, or right of its anchor position.
Gets or sets the label outline color of this feature.
Gets or sets the outline width in pixels of this feature.
Gets or sets the fill and outline style of this feature.
Get or sets the vertical origin of this point's text, which determines if the point's text is to the bottom, center, top, or baseline of it's anchor point.
Gets or sets the point outline color of this feature.
Gets or sets the point outline width in pixels of this feature.
All objects returned by Scene.pick have a primitive
property. This returns the tileset containing the feature.
Gets or sets the near and far scaling properties for this feature.
Gets the tileset containing the feature.
Gets or sets the near and far translucency properties for this feature.
Gets or sets the vertical origin of this point, which determines if the point is to the bottom, center, or top of its anchor position.
Functions
Returns a copy of the value of the feature's property with the given name. This includes properties from this feature's class and inherited classes when using a batch table hierarchy.
Returns an array of property IDs for the feature. This includes properties from this feature's class and inherited classes when using a batch table hierarchy.
Returns whether the feature contains this property. This includes properties from this feature's class and inherited classes when using a batch table hierarchy.
Sets the value of the feature's property with the given name.