terra-draw
Version:
Frictionless map drawing across mapping provider
27 lines (26 loc) • 1.02 kB
TypeScript
import { LineString, Point, Polygon, Position } from "geojson";
import { BehaviorConfig, TerraDrawModeBehavior } from "../../base.behavior";
import { FeatureId } from "../../../store/store";
import { SELECT_PROPERTIES } from "../../../common";
export type SelectionPointProperties = {
mode: string;
index: number;
[SELECT_PROPERTIES.SELECTION_POINT_FEATURE_ID]: string;
[SELECT_PROPERTIES.SELECTION_POINT]: true;
};
export declare class SelectionPointBehavior extends TerraDrawModeBehavior {
constructor(config: BehaviorConfig);
private _selectionPoints;
get ids(): FeatureId[];
set ids(_: FeatureId[]);
create(selectedCoords: Position[], type: Polygon["type"] | LineString["type"], featureId: FeatureId): void;
delete(): void;
getUpdated(updatedCoordinates: Position[]): {
id: FeatureId;
geometry: Point;
}[] | undefined;
getOneUpdated(index: number, updatedCoordinate: Position): {
id: string;
geometry: Point;
} | undefined;
}