import { Map as _ol_Map_ } from 'ol'; import Collection from 'ol/Collection'; import { Coordinate } from 'ol/coordinate'; import Feature from 'ol/Feature'; import { Style } from 'ol/style'; import GeometryType from 'ol/geom/GeometryType'; import { Pointer } from 'ol/interaction'; import MapBrowserEvent from 'ol/MapBrowserEvent'; import { Condition as EventsConditionType } from 'ol/events/condition'; export interface Options { features: Collection; pixelTolerance: number; filter: ((...params: any[]) => any) | undefined; style: Style | Style[] | undefined; condition: EventsConditionType | undefined; deleteCondition: EventsConditionType | undefined; insertVertexCondition: EventsConditionType | undefined; } /** Interaction for modifying feature geometries. Similar to the core ol/interaction/Modify. * The interaction is more suitable to use to handle feature modification: only features concerned * by the modification are passed to the events (instead of all feature with ol/interaction/Modify) * - the modifystart event is fired before the feature is modified (no points still inserted) * - the modifyend event is fired after the modification * - it fires a modifying event * @constructor * @extends {interaction.Pointer} * @fires modifystart * @fires modifying * @fires modifyend * @param {*} options * @param {VectorSource|Array{VectorSource}} options.source a list of source to modify (configured with useSpatialIndex set to true) * @param {Collection.} options.features collection of feature to modify * @param {number} options.pixelTolerance Pixel tolerance for considering the pointer close enough to a segment or vertex for editing. Default is 10. * @param {function|undefined} options.filter a filter that takes a feature and return true if it can be modified, default always true. * @param {Style | Array