---
title: "GeoJSONFeatureDiff | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Type Alias GeoJSONFeatureDiff

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.

type GeoJSONFeatureDiff \= {  
    [addOrUpdateProperties](#addorupdateproperties)?: { key: string; value: any }\[\];  
    [id](#id): [GeoJSONFeatureId](https://docs.maptiler.com/sdk-js/api-reference/types/GeoJSONFeatureId/);  
    [newGeometry](#newgeometry)?: [Geometry](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.Geometry/);  
    [removeAllProperties](#removeallproperties)?: boolean;  
    [removeProperties](#removeproperties)?: string\[\];  
}

##### Index

### Properties[](#properties)

[addOrUpdateProperties?](#addorupdateproperties) [id](#id) [newGeometry?](#newgeometry) [removeAllProperties?](#removeallproperties) [removeProperties?](#removeproperties)

## Properties[](#properties-1)

### `Optional`addOrUpdateProperties[](#addorupdateproperties)

addOrUpdateProperties?: { key: string; value: any }\[\]

The properties to add or update along side their values

### id[](#id)

id: [GeoJSONFeatureId](https://docs.maptiler.com/sdk-js/api-reference/types/GeoJSONFeatureId/)

The feature ID

### `Optional`newGeometry[](#newgeometry)

newGeometry?: [Geometry](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.Geometry/)

If it's a new geometry, place it here

### `Optional`removeAllProperties[](#removeallproperties)

removeAllProperties?: boolean

Setting to `true` will remove all preperties

### `Optional`removeProperties[](#removeproperties)

removeProperties?: string\[\]

The properties keys to remove
