Skip to content

gi-nx


gi-nx / getLassoedProjectFeatures

ts
function getLassoedProjectFeatures(): Promise<
  | (
  | RawPoint
  | RawMultiPoint
  | RawLineString
  | RawMultiLineString
  | RawPolygon
  | RawMultiPolygon)[]
  | (
  | MapboxLensable
| GiraffeProjectBoundary)[]>;

Prompt the user to draw a lasso and return all project features within the selection.

Returns

Promise< | ( | RawPoint | RawMultiPoint | RawLineString | RawMultiLineString | RawPolygon | RawMultiPolygon)[] | ( | MapboxLensable | GiraffeProjectBoundary)[]>

Example

typescript
const selectedFeatures = await rpc.invoke("getLassoedProjectFeatures", []);
console.log(`Selected ${selectedFeatures.length} features`);
selectedFeatures.forEach(f => console.log(f.properties.id));