# LayerFeature

***

A LayerFeature is a single geographical item in a layer.

It is intended to be a lightweight object that contains the properties of a feature, but not the geometry. It is returned by methods like [FeltController.getRenderedFeatures](/js-sdk-api-reference/layers/layerscontroller.md#getrenderedfeatures) and [FeltController.getFeature](/js-sdk-api-reference/layers/layerscontroller.md#getfeature), and as part of the methods in the [SelectionController](/js-sdk-api-reference/selection/selectioncontroller.md)

The geometry can be obtained via the [FeltController.getGeoJsonFeature](/js-sdk-api-reference/layers/layerscontroller.md#getgeojsonfeature) method, which returns a [GeoJsonFeature](/js-sdk-api-reference/shared/geojsonfeature.md) object.

## Properties

### id

> **id**: `string` | `number`

The identifier of the feature, unique within the layer.

***

### isDeterministicId

> **isDeterministicId**: `boolean`

Whether the id is deterministic.

#### Remarks

If the id is deterministic, it means that the id can be used to reference the feature in the layer and therefore in all the SDK feature-related methods.

When the id is not deterministic, the feature cannot be referenced on SDK methods like [FeltController.getFeature](/js-sdk-api-reference/layers/layerscontroller.md#getfeature) or [SelectionController.selectFeature](/js-sdk-api-reference/selection/selectioncontroller.md#selectfeature).

For layers created and processed on Felt servers, the feature IDs are deterministic because Felt ensures every feature is correctly identified in vector tiles. This cannot be guaranteed for layers created using a GeoJSON source on the SDK (see [LayersController.createLayersFromGeoJson](/js-sdk-api-reference/layers/layerscontroller.md#createlayersfromgeojson)) where the ID will only be deterministic if GeoJSON features have an `id` property.

***

### layerId

> **layerId**: `string`

The identifier of the layer that the feature belongs to.

***

### geometryType

> **geometryType**: `"Polygon"` | `"MultiPolygon"` | `"LineString"` | `"MultiLineString"` | `"Point"` | `"MultiPoint"` | `string` & {}

The type of geometry of the feature.

#### Remarks

Because LayerFeatures can be read from tiled features, it's possible that this `geometryType` won't match the `geometry.type` of the [GeoJsonFeature](/js-sdk-api-reference/shared/geojsonfeature.md) returned by [FeltController.getGeoJsonFeature](/js-sdk-api-reference/layers/layerscontroller.md#getgeojsonfeature).

For example, this may return `LineString` but the full feature is a `MultiLineString`, or, similarly `Polygon` here may be a `MultiPolygon` in the full feature.

As a result, you should treat this property as being indicative only.

***

### bbox

> **bbox**: `undefined` | \[`number`, `number`, `number`, `number`]

The bounding box of the feature.

#### Remarks

Because LayerFeatures can be read from tiled features and considering that feature geometry can go through multiple tiles, it's possible that this is not the complete bounding box of the feature.

***

### properties

> **properties**: [`GeoJsonProperties`](/js-sdk-api-reference/shared/geojsonproperties.md)

The properties of the feature, as a bag of attributes.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.felt.com/js-sdk-api-reference/layers/layerfeature.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
