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
.
Example:
// On mouse over, display all the properties for a feature in the console log.
handler.setInputAction(function(movement) {
var feature = scene.pick(movement.endPosition);
if (feature instanceof Cesium.Cesium3DTilePointFeature) {
var propertyNames = feature.getPropertyNames();
var length = propertyNames.length;
for (var i = 0; i < length; ++i) {
var propertyName = propertyNames[i];
console.log(propertyName + ': ' + feature.getProperty(propertyName));
}
}
}, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
Experimental
This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
Members
anchorLineColor : Color
Only applied when heightOffset
is defined.
Only applied when heightOffset
is defined.
backgroundColor : Color
Only applied when labelText
is defined.
Only applied when labelText
is defined.
backgroundPadding : Cartesian2
Only applied when labelText
is defined.
Only applied when image
is undefined
.
distanceDisplayCondition : DistanceDisplayCondition
Only applied when the labelText
is defined.
horizontalOrigin : HorizontalOrigin
labelColor : Color
The color will be applied to the label if labelText
is defined.
labelHorizontalOrigin : HorizontalOrigin
labelOutlineColor : Color
The outline color will be applied to the label if labelText
is defined.
The outline width will be applied to the point if labelText
is defined.
labelStyle : LabelStyle
Only applied when labelText
is defined.
labelVerticalOrigin : VerticalOrigin
pointOutlineColor : Color
Only applied when image
is undefined
.
Only applied when image
is undefined
.
Only applied when image
is undefined
.
readonly primitive : Cesium3DTileset
Scene#pick
返回的所有对象都具有primitive
属性。这就回来了
包含该功能的瓷砖集。scaleByDistance : NearFarScalar
-
Default Value:
true
readonly tileset : Cesium3DTileset
translucencyByDistance : NearFarScalar
verticalOrigin : VerticalOrigin
Methods
Name | Type | Description |
---|---|---|
name |
String | 属性的区分大小写的名称。 |
Returns:
undefined
。Example:
// Display all the properties for a feature in the console log.
var propertyNames = feature.getPropertyNames();
var length = propertyNames.length;
for (var i = 0; i < length; ++i) {
var propertyName = propertyNames[i];
console.log(propertyName + ': ' + feature.getProperty(propertyName));
}
See:
Name | Type | Description |
---|---|---|
results |
Array.<String> | optional 存储结果的数组。 |
Returns:
Name | Type | Description |
---|---|---|
name |
String | 属性的区分大小写的名称。 |
Returns:
If a property with the given name doesn't exist, it is created.
Name | Type | Description |
---|---|---|
name |
String | 属性的区分大小写的名称。 |
value |
* | 要复制的属性的值。 |
Throws:
-
DeveloperError :继承的批处理表层次结构属性是只读的。
Examples:
var height = feature.getProperty('Height'); // e.g., the height of a building
var name = 'clicked';
if (feature.getProperty(name)) {
console.log('already clicked');
} else {
feature.setProperty(name, true);
console.log('first click');
}