| Name | Type | Description |
|---|---|---|
content |
Cesium3DTileContent | |
batchId |
number | |
billboard |
Billboard | |
label |
Label | |
polyline |
Polyline |
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
此功能使用的 3D Tiles 规范部分尚未最终确定,可能在不遵循 Cesium 标准弃用策略的情况下发生变更。
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:
// 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:
| 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'); // 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');
}
