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 { Interaction } from 'ol/interaction'; import MapBrowserEvent from 'ol/MapBrowserEvent'; export interface Options { features: Collection; snapDistance: number; cursor: string | undefined; sketchStyle: Style | Style[] | undefined; tolerance: ((...params: any[]) => number) | undefined; } /** Interaction split interaction for splitting feature geometry * @constructor * @extends {Interaction} * @fires beforesplit, aftersplit, pointermove * @param {*} * @param {VectorSource|Array{VectorSource}} options.source a list of source to split (configured with useSpatialIndex set to true) * @param {Collection.} options.features collection of feature to split * @param {number} options.snapDistance distance (in px) to snap to an object, default 25px * @param {string|undefined} options.cursor cursor name to display when hovering an objet * @param {function|undefined} opttion.filter a filter that takes a feature and return true if it can be clipped, default always split. * @param Style | Array