terra-draw
Version:
Frictionless map drawing across mapping provider
22 lines (21 loc) • 1.13 kB
TypeScript
import { BehaviorConfig, TerraDrawModeBehavior } from "./base.behavior";
import { FeatureId } from "../extend";
import { GeoJSONStoreGeometries, JSONObject } from "../store/store";
import { Position, Point } from "geojson";
export declare class ReadFeatureBehavior extends TerraDrawModeBehavior {
constructor(config: BehaviorConfig);
getGeometryType(featureId: FeatureId): "Polygon" | "LineString" | "Point";
coordinateAtIndexIsIdentical({ featureId, newCoordinate, index, }: {
featureId: FeatureId;
newCoordinate: Position;
index: number;
}): boolean;
getGeometry<G extends GeoJSONStoreGeometries>(featureId: FeatureId): G;
getCoordinates<G extends Exclude<GeoJSONStoreGeometries, Point>>(featureId: FeatureId): Position[];
getCoordinate<G extends Exclude<GeoJSONStoreGeometries, Point>>(featureId: FeatureId, index: number): Position;
getProperties(featureId: FeatureId): {
[x: string]: import("../store/store").JSON;
};
hasFeature(featureId: FeatureId): boolean;
getAllFeatureIdsWhere(equals: (properties: JSONObject) => boolean): FeatureId[];
}