import type { Coordinate } from 'ol/coordinate' import type Feature from 'ol/Feature' import type { Point, Polygon } from 'ol/geom' import type VectorSource from 'ol/source/Vector' import { BinBase } from './BinBase' export interface Options { source?: VectorSource; binSource?: VectorSource; features?: Feature[]; size?: number; geometryFunction?: (f: Feature) => Point; flatAttributes?: (bin: Feature, features: Feature[]) => void; } /** A source that use a set of feature to collect data on it. * If a binSource is provided the bin is recalculated when features change. * @constructor * @extends {ol_source_BinBase} * */ export default class FeatureBin extends BinBase { /** * @param {Object} options ol_source_VectorOptions + grid option * @param {ol.source.Vector} options.source source to collect in the bin * @param {ol.source.Vector} options.binSource a source to use as bin collector, default none * @param {Array