Skip to content

GeoJSONFeatureDiff

GeoJSONFeatureDiff = object

Defined in: src/source/geojson_source_diff.ts:34

A geojson feature diff object - processed in the following order: new geometry, remove properties, add/update properties. Provides an efficient way to update GeoJSON features in a map source without replacing the entire feature.

Properties

addOrUpdateProperties?

optional addOrUpdateProperties: object[]

Defined in: src/source/geojson_source_diff.ts:54

The properties to add or update along side their values

key

key: string

value

value: any


id

id: GeoJSONFeatureId

Defined in: src/source/geojson_source_diff.ts:38

The feature ID


newGeometry?

optional newGeometry: GeoJSON.Geometry

Defined in: src/source/geojson_source_diff.ts:42

If it's a new geometry, place it here


removeAllProperties?

optional removeAllProperties: boolean

Defined in: src/source/geojson_source_diff.ts:46

Setting to true will remove all preperties


removeProperties?

optional removeProperties: string[]

Defined in: src/source/geojson_source_diff.ts:50

The properties keys to remove