| Name | Type | Description |
|---|---|---|
content |
Cesium3DTileContent | |
batchId |
number | |
billboard |
Billboard | |
label |
Label | |
polyline |
Polyline |
Example:
// 鼠标悬停时,在控制台日志中显示要素的所有属性。
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
仅在定义了 heightOffset 时应用。
仅在定义了 heightOffset 时应用。
backgroundColor : Color
仅在定义了 labelText 时应用。
仅在定义了 labelText 时应用。
backgroundPadding : Cartesian2
仅在定义了 labelText 时应用。
仅在 image 为 undefined 时应用。
distanceDisplayCondition : DistanceDisplayCondition
仅在定义了 labelText 时应用。
horizontalOrigin : HorizontalOrigin
labelColor : Color
如果定义了 labelText,则颜色将应用于标签。
labelHorizontalOrigin : HorizontalOrigin
labelOutlineColor : Color
如果定义了 labelText,则轮廓颜色将应用于标签。
如果定义了 labelText,则轮廓宽度将应用于点。
仅在定义了 labelText 时应用。
labelVerticalOrigin : VerticalOrigin
pointOutlineColor : Color
仅在 image 为 undefined 时应用。
仅在 image 为 undefined 时应用。
仅在 image 为 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:
// 在控制台日志中显示要素的所有属性。
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');
}
