Cesium3DTilePointFeature

new Cesium.Cesium3DTilePointFeature()

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

获取或设置定位线的颜色。

Only applied when heightOffset is defined.

anchorLineEnabled : Boolean

获取或设置是否显示定位线。

Only applied when heightOffset is defined.

获取或设置此功能的文本的背景色。

Only applied when labelText is defined.

backgroundEnabled : Boolean

获取或设置是否显示此功能的文本背景。

Only applied when labelText is defined.

获取或设置此功能的文本的背景填充。

Only applied when labelText is defined.

获取或设置此功能点的颜色。

Only applied when image is undefined.

disableDepthTestDistance : Number

获取或设置将禁用深度测试的距离。
获取或设置一个条件,该条件指定此功能将在距相机的距离处显示。
获取或设置此功能的字体。

Only applied when the labelText is defined.

获取或设置此功能的高度偏移(以米为单位)。
获取或设置此点的水平原点,它确定该点是否 在其锚定位置的左侧、中心或右侧。
获取或设置此功能的映像。
获取或设置此功能的标签颜色。

The color will be applied to the label if labelText is defined.

获取或设置此点文本的水平原点,它确定该点的文本是否 在其锚定位置的左侧、中心或右侧。
获取或设置此功能的标签轮廓颜色。

The outline color will be applied to the label if labelText is defined.

labelOutlineWidth : Number

获取或设置此功能的轮廓宽度(以像素为单位)。

The outline width will be applied to the point if labelText is defined.

获取或设置此功能的填充和大纲样式。

Only applied when labelText is defined.

获取或设置此功能的文本。
获取或设置此点文本的垂直原点,它确定该点的文本是否 到它的锚定点的底部、中心、顶部或基线。
获取或设置此功能的点轮廓颜色。

Only applied when image is undefined.

pointOutlineWidth : Number

获取或设置此功能的点轮廓宽度(以像素为单位)。

Only applied when image is undefined.

获取或设置此功能的点大小。

Only applied when image is undefined.

Scene#pick返回的所有对象都具有primitive属性。这就回来了 包含该功能的瓷砖集。
获取或设置此功能的远近缩放属性。
获取或设置是否显示该功能。这是为所有功能设置的 当评估样式的显示时。
Default Value: true
获取包含该功能的分片集。
获取或设置此功能的近半透明和远半透明特性。
获取或设置此点的垂直原点,它确定该点是否 到其锚定位置的底部、中心或顶部。

Methods

getProperty(name)*

返回具有给定名称的功能属性值的副本。这包括此功能的属性 当使用批处理表层次结构时,类和继承的类。
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:

getPropertyNames(results)Array.<String>

返回功能的属性名数组。这包括此功能的属性 当使用批处理表层次结构时,类和继承的类。
Name Type Description
results Array.<String> optional 存储结果的数组。
Returns:
功能属性的名称。
See:

hasProperty(name)Boolean

返回功能是否包含此属性。这包括此功能的属性 当使用批处理表层次结构时,类和继承的类。
Name Type Description
name String 属性的区分大小写的名称。
Returns:
功能是否包含此属性。
See:

setProperty(name, value)

使用给定的名称设置要素属性的值。

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');
}