Skip to content

gi-nx


gi-nx / updateProject

ts
const updateProject: (feature: Project) => void | Promise<Project>;

Update a project's geometry or properties.

Parameters ​

ParameterTypeDescription
featureProjectGeoJSON Polygon feature with updated data

Returns ​

void | Promise<Project>

Promise that resolves when update is complete

Throws ​

Error if polygon JSON is too large or not a single polygon

Needs Permission ​

Example ​

typescript
const project = structuredClone(existingProject);
project.properties.name = "Updated Name";
project.properties.status = "active";
await rpc.invoke("updateProject", [project]);