gi-nx / getLassoedProjectFeatures
ts
function getLassoedProjectFeatures(): Promise<
| (
| RawPoint & {
temporary?: never;
}
| RawMultiPoint & {
temporary?: never;
}
| RawLineString & {
temporary?: never;
}
| RawMultiLineString & {
temporary?: never;
}
| RawPolygon & {
temporary?: never;
}
| RawMultiPolygon & {
temporary?: never;
})[]
| (
| MapboxLensable
| GiraffeProjectBoundary)[]>;Prompt the user to draw a lasso and return all project features within the selection.
Returns
Promise< | ( | RawPoint & { temporary?: never; } | RawMultiPoint & { temporary?: never; } | RawLineString & { temporary?: never; } | RawMultiLineString & { temporary?: never; } | RawPolygon & { temporary?: never; } | RawMultiPolygon & { temporary?: never; })[] | ( | MapboxLensable | GiraffeProjectBoundary)[]>
Example
typescript
const selectedFeatures = await rpc.invoke("getLassoedProjectFeatures", []);
console.log(`Selected ${selectedFeatures.length} features`);
selectedFeatures.forEach(f => console.log(f.properties.id));