---
title: "GeoJSONSourceDiff | 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 GeoJSONSourceDiff

The geojson source diff object - processed in the following order: remove, add, update. Provides an efficient way to update GeoJSON data in a map source without having to replace the entire dataset.

type GeoJSONSourceDiff \= {  
    [add](#add)?: [Feature](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Feature/)\[\];  
    [remove](#remove)?: [GeoJSONFeatureId](https://docs.maptiler.com/sdk-js/api-reference/types/GeoJSONFeatureId/)\[\];  
    [removeAll](#removeall)?: boolean;  
    [update](#update)?: [GeoJSONFeatureDiff](https://docs.maptiler.com/sdk-js/api-reference/types/GeoJSONFeatureDiff/)\[\];  
}

##### Index

### Properties[](#properties)

[add?](#add) [remove?](#remove) [removeAll?](#removeall) [update?](#update)

## Properties[](#properties-1)

### `Optional`add[](#add)

add?: [Feature](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Feature/)\[\]

An array of features to add

### `Optional`remove[](#remove)

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

An array of features IDs to remove

### `Optional`removeAll[](#removeall)

removeAll?: boolean

When set to `true` it will remove all features

### `Optional`update[](#update)

update?: [GeoJSONFeatureDiff](https://docs.maptiler.com/sdk-js/api-reference/types/GeoJSONFeatureDiff/)\[\]

An array of update objects
