new Cesium.Cesium3DTilePointFeature()

A point feature of a Cesium3DTileset.

提供对存储在瓷砖批量表中的特性的访问权限,以及 作为显示/隐藏特征并改变其点属性的能力

对 NT 0 铯3DTILEPointFeature NT 1 的修改具有瓷砖的寿命 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) {
    const feature = scene.pick(movement.endPosition);
    if (feature instanceof Cesium.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)}`);
        }
    }
}, 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

获取或设置锚线的颜色.

仅在 NT 0 hightOffset NT 1 确定时才适用.

anchorLineEnabled : boolean

获取或设定锚线是否显示 .

仅在 NT 0 hightOffset NT 1 确定时才适用.

backgroundColor : Color

为此特性获取或设置文本的背景颜色 .

仅在 NT 0 labelText NT 1 定义时才应用.

backgroundEnabled : boolean

获取或设定是否显示此特性的文本背景 .

仅在 NT 0 labelText NT 1 定义时才应用.

backgroundPadding : Cartesian2

获取或设置此特性的文本背景补丁 .

仅在 NT 0 labelText NT 1 定义时才应用.

color : Color

获取或设置此特性点的颜色 .

仅在 NT 0 image NT 1 为 NT 2 未定义 NT 3 时适用.

disableDepthTestDistance : number

获取或设定深度测试将被禁用的距离 .

distanceDisplayCondition : DistanceDisplayCondition

获取或设置条件,指定此特性将显示于相机的距离 .

font : string

获取或设置此特性的字体 .

只有在定义了 NT 0 labelText NT 1 时才适用.

heightOffset : number

获得或设置此特性的高度乘以米.

horizontalOrigin : HorizontalOrigin

获取或设置此点的水平源, 从而决定该点是否为 在它的锚位置的左、中或右侧.

image : string

获取或设置此特性的图像 .

labelColor : Color

获取或设置此特性的标签颜色 .

如果定义了 NT 0 labelText NT 1 ,颜色将应用到标签上.

labelHorizontalOrigin : HorizontalOrigin

获取或设置此点文本的横向来源, 以决定该点的文本是否 在它的锚位置的左、中或右侧.

labelOutlineColor : Color

获取或设置此特性的标签大纲颜色 .

如果定义了 NT 0 labelText NT 1 ,则大纲颜色将应用到标签上.

labelOutlineWidth : number

获取或设置此特性的轮廓宽度像素.

如果定义了 NT 0 labelText NT 1 ,则大纲宽度将应用到此点.

labelStyle : LabelStyle

获取或设置此特性的填充和大纲样式.

仅在 NT 0 labelText NT 1 定义时才应用.

labelText : string

获取或设置此特性的文本 .

labelVerticalOrigin : VerticalOrigin

获取或设置此点的文字的垂直源头, 决定该点的文字是否为 到它的锚点的底部、中心、顶部或基线.

pointOutlineColor : Color

获取或设置此特性的点大纲颜色 .

仅在 NT 0 image NT 1 为 NT 2 未定义 NT 3 时适用.

pointOutlineWidth : number

以此特性的像素获取或设置点大纲宽度.

仅在 NT 0 image NT 1 为 NT 2 未定义 NT 3 时适用.

pointSize : number

获取或设置此特性的点大小 .

仅在 NT 0 image NT 1 为 NT 2 未定义 NT 3 时适用.

readonly primitive : Cesium3DTileset

All objects returned by Scene#pick have a primitive property. This returns 包含该特性的平板.

scaleByDistance : NearFarScalar

获取或设置此特性的近和远缩放属性 .

show : boolean

如果显示特性, 则获取或设定 。 此设定为所有特性 当一个风格的节目被评价时.
Default Value: true

readonly tileset : Cesium3DTileset

获得包含特性的平板.

translucencyByDistance : NearFarScalar

获取或设置此特性的近透明性和远透明性.

verticalOrigin : VerticalOrigin

获取或设置此点的垂直源头, 确定该点是否为 到它的锚位置的底部、中心或顶部.

Methods

getProperty(name)*

返回带有指定名称的特性属性值的副本。 包括来自此特性的属性 在使用批次表等级时,分类和继承的分类.
Name Type Description
name string 财产的大小写名称.
Returns:
The value of the property or undefined if the feature does not have this property.
Example:
// Display all the properties for a feature in the console log.
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)}`);
}
See:

getPropertyIds(results)Array.<string>

返回特性的属性标识组。 包括来自此特性的属性 在使用批次表等级时,分类和继承的分类.
Name Type Description
results Array.<string> optional 存储结果的数组 .
Returns:
特征属性的ID.
See:

hasProperty(name)boolean

返回特性是否包含此属性 。 包括来自此特性的属性 在使用批次表等级时,分类和继承的分类.
Name Type Description
name string 财产的大小写名称.
Returns:
特性是否包含此属性 .
See:

setProperty(name, value)

设置特性属性与给定名称的值.

如果一个有给定名称的财产不存在,它就是创建的.

Name Type Description
name string 财产的大小写名称.
value * 将复制的属性的值 .
Throws:
  • DeveloperError : Inherited batch table hierarchy property is read only.
Examples:
const height = feature.getProperty('Height'); // e.g., the height of a building
const name = 'clicked';
if (feature.getProperty(name)) {
    console.log('already clicked');
} else {
    feature.setProperty(name, true);
    console.log('first click');
}
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.