# Cesium3DTilePointFeature

#### new Cesium.Cesium3DTilePointFeature()
engine/Source/Scene/Cesium3DTilePointFeature.js 43

A point feature of a `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) {
        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
engine/Source/Scene/Cesium3DTilePointFeature.js 460

Gets or sets the color for the anchor line.

Only applied when `heightOffset` is defined.

#### anchorLineEnabled : boolean
engine/Source/Scene/Cesium3DTilePointFeature.js 441

Gets or sets whether the anchor line is displayed.

Only applied when `heightOffset` is defined.

#### backgroundColor : Color
engine/Source/Scene/Cesium3DTilePointFeature.js 302

Gets or sets the background color of the text for this feature.

Only applied when `labelText` is defined.

#### backgroundEnabled : boolean
engine/Source/Scene/Cesium3DTilePointFeature.js 340

Gets or sets whether to display the background of the text for this feature.

Only applied when `labelText` is defined.

#### backgroundPadding : Cartesian2
engine/Source/Scene/Cesium3DTilePointFeature.js 321

Gets or sets the background padding of the text for this feature.

Only applied when `labelText` is defined.

#### color : Color
engine/Source/Scene/Cesium3DTilePointFeature.js 107

Gets or sets the color of the point of this feature.

Only applied when `image` is `undefined`.

#### disableDepthTestDistance : number
engine/Source/Scene/Cesium3DTilePointFeature.js 499

Gets or sets the distance where depth testing will be disabled.

#### distanceDisplayCondition : DistanceDisplayCondition
engine/Source/Scene/Cesium3DTilePointFeature.js 390

Gets or sets the condition specifying at what distance from the camera that this feature will be displayed.

#### font : string
engine/Source/Scene/Cesium3DTilePointFeature.js 245

Gets or sets the font of this feature.

Only applied when the `labelText` is defined.

#### heightOffset : number
engine/Source/Scene/Cesium3DTilePointFeature.js 408

Gets or sets the height offset in meters of this feature.

#### horizontalOrigin : HorizontalOrigin
engine/Source/Scene/Cesium3DTilePointFeature.js 517

Gets or sets the horizontal origin of this point, which determines if the point is to the left, center, or right of its anchor position.

#### image : string
engine/Source/Scene/Cesium3DTilePointFeature.js 479

Gets or sets the image of this feature.

#### labelColor : Color
engine/Source/Scene/Cesium3DTilePointFeature.js 187

Gets or sets the label color of this feature.

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

#### labelHorizontalOrigin : HorizontalOrigin
engine/Source/Scene/Cesium3DTilePointFeature.js 551

Gets or sets the horizontal origin of this point's text, which determines if the point's text is to the left, center, or right of its anchor position.

#### labelOutlineColor : Color
engine/Source/Scene/Cesium3DTilePointFeature.js 207

Gets or sets the label outline color of this feature.

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

#### labelOutlineWidth : number
engine/Source/Scene/Cesium3DTilePointFeature.js 226

Gets or sets the outline width in pixels of this feature.

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

#### labelStyle : LabelStyle
engine/Source/Scene/Cesium3DTilePointFeature.js 264

Gets or sets the fill and outline style of this feature.

Only applied when `labelText` is defined.

#### labelText : string
engine/Source/Scene/Cesium3DTilePointFeature.js 280

Gets or sets the text for this feature.

#### labelVerticalOrigin : VerticalOrigin
engine/Source/Scene/Cesium3DTilePointFeature.js 568

Get or sets the vertical origin of this point's text, which determines if the point's text is to the bottom, center, top, or baseline of it's anchor point.

#### pointOutlineColor : Color
engine/Source/Scene/Cesium3DTilePointFeature.js 147

Gets or sets the point outline color of this feature.

Only applied when `image` is `undefined`.

#### pointOutlineWidth : number
engine/Source/Scene/Cesium3DTilePointFeature.js 167

Gets or sets the point outline width in pixels of this feature.

Only applied when `image` is `undefined`.

#### pointSize : number
engine/Source/Scene/Cesium3DTilePointFeature.js 127

Gets or sets the point size of this feature.

Only applied when `image` is `undefined`.

#### readonly primitive : Cesium3DTileset
engine/Source/Scene/Cesium3DTilePointFeature.js 618

All objects returned by `Scene#pick` have a `primitive` property. This returns the tileset containing the feature.

#### scaleByDistance : NearFarScalar
engine/Source/Scene/Cesium3DTilePointFeature.js 356

Gets or sets the near and far scaling properties for this feature.

#### show : boolean
engine/Source/Scene/Cesium3DTilePointFeature.js 86

Gets or sets if the feature will be shown. This is set for all features when a style's show is evaluated.

Default Value: `true`

#### readonly tileset : Cesium3DTileset
engine/Source/Scene/Cesium3DTilePointFeature.js 602

Gets the tileset containing the feature.

#### translucencyByDistance : NearFarScalar
engine/Source/Scene/Cesium3DTilePointFeature.js 373

Gets or sets the near and far translucency properties for this feature.

#### verticalOrigin : VerticalOrigin
engine/Source/Scene/Cesium3DTilePointFeature.js 534

Gets or sets the vertical origin of this point, which determines if the point is to the bottom, center, or top of its anchor position.

### Methods

#### getProperty(name) → *
engine/Source/Scene/Cesium3DTilePointFeature.js 752

Returns a copy of the value of the feature's property with the given name. This includes properties from this feature's class and inherited classes when using a batch table hierarchy.

Name | Type | Description
--- | --- | ---
`name` | string | The case-sensitive name of the property.

##### 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:

- https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_batch_table_hierarchy

#### getPropertyIds(results) → Array.<string>
engine/Source/Scene/Cesium3DTilePointFeature.js 730

Returns an array of property IDs for the feature. This includes properties from this feature's class and inherited classes when using a batch table hierarchy.

Name | Type | Description
--- | --- | ---
`results` | Array.<string> | optional An array into which to store the results.

##### Returns:

The IDs of the feature's properties.

##### See:

- https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_batch_table_hierarchy

#### hasProperty(name) → boolean
engine/Source/Scene/Cesium3DTilePointFeature.js 717

Returns whether the feature contains this property. This includes properties from this feature's class and inherited classes when using a batch table hierarchy.

Name | Type | Description
--- | --- | ---
`name` | string | The case-sensitive name of the property.

##### Returns:

Whether the feature contains this property.

##### See:

- https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_batch_table_hierarchy

#### setProperty(name, value)
engine/Source/Scene/Cesium3DTilePointFeature.js 803

Sets the value of the feature's property with the given name.

If a property with the given name doesn't exist, it is created.

Name | Type | Description
--- | --- | ---
`name` | string | The case-sensitive name of the property.
`value` | * | The value of the property that will be copied.

##### 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.