| Name | Type | Description |
|---|---|---|
content |
Cesium3DTileContent | |
batchId |
number |
Example:
// 鼠标悬停时,在控制台日志中显示要素的所有属性。
handler.setInputAction(function(movement) {
const feature = scene.pick(movement.endPosition);
if (feature instanceof Cesium.Cesium3DTileFeature) {
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);
Members
-
Default Value:
Color.WHITE
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.
Cesium3DTileset#vectorKeepDecodedPositions 为 false
或要素不是矢量瓦片中的折线,则返回 undefined。
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.
readonly primitive : Cesium3DTileset
Scene#pick 返回的所有对象都有一个 primitive 属性。此属性返回
包含要素的瓦片集。
-
Default Value:
true
readonly tileset : Cesium3DTileset
Methods
3DTILES_metadata 扩展的瓦片集中,则会继承瓦片集、组和瓦片元数据。
为了解决名称冲突,此方法按元数据粒度从最具体到 最不具体解析名称,顺序为:要素、瓦片、组、 瓦片集。在每个粒度内,先解析语义,然后解析其他 属性。
- 按语义的批处理表(结构化元数据)属性
- 按属性 ID 的批处理表(结构化元数据)属性
- 按语义的内容元数据属性
- 按属性 ID 的内容元数据属性
- 按语义的瓦片元数据属性
- 按属性 ID 的瓦片元数据属性
- 按语义的子树元数据属性
- 按属性 ID 的子树元数据属性
- 按语义的组元数据属性
- 按属性 ID 的组元数据属性
- 按语义的瓦片集元数据属性
- 按属性 ID 的瓦片集元数据属性
- 否则,返回 undefined
有关 3D Tiles Next 的详细信息,请参阅 3DTILES_metadata Extension 了解 3D Tiles,以及 EXT_structural_metadata Extension 了解 glTF。对于传统 glTF 扩展,请参阅 EXT_feature_metadata Extension
| Name | Type | Description |
|---|---|---|
content |
Cesium3DTileContent | 用于访问元数据的内容 |
batchId |
number | 要获取属性的要素的批处理 ID(或要素 ID) |
name |
string | 要素的语义或属性 ID。在每个元数据粒度中,先检查语义,然后检查属性 ID。 |
Returns:
undefined。
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.
| Name | Type | Description |
|---|---|---|
name |
string | 属性的区分大小写名称。 |
Returns:
undefined。
Example:
// 在控制台日志中显示要素的所有属性。
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:
| Name | Type | Description |
|---|---|---|
results |
Array.<string> | optional 用于存储结果的数组。 |
Returns:
| Name | Type | Description |
|---|---|---|
name |
string | 属性的区分大小写名称。 |
Returns:
如果不存在具有给定名称的属性,则会创建该属性。
| Name | Type | Description |
|---|---|---|
name |
string | 属性的区分大小写名称。 |
value |
* | 将被复制的属性值。 |
Throws:
-
DeveloperError : 继承的批处理表层次结构属性为只读。
Examples:
const height = feature.getProperty('Height'); // 例如,建筑物的高度
const name = 'clicked';
if (feature.getProperty(name)) {
console.log('already clicked');
} else {
feature.setProperty(name, true);
console.log('first click');
}
