/** * @module SuperCluster */ import Supercluster from "supercluster"; import { Feature, View } from 'ol'; import { Geometry } from 'ol/geom'; import { Vector as VectorSource } from 'ol/source'; import { Extent } from 'ol/extent'; import Projection from 'ol/proj/Projection'; import { GeoJsonProperties } from 'geojson'; /** * @typedef {Object} Options * @property {import("ol/source/Source").AttributionLike} [attributions] Attributions. * @property {import("ol/view/View").View} [view] View of the map. * @property {number} [radius=60] Radius in pixels between clusters. * @property {boolean} [onDemandMode=false] Defines if the features leaves should be * processed while detecting clusters or not * @property {function(Feature):GeoJSON.Feature} [geojsonFunction] * Function that takes an {@link module:ol/Feature} as argument and returns an * {@link module:Supercluster.Point
} as input for SuperCluster based on the feature. When a * feature should not be considered for clustering, the function should return * `null`. The default, which works when the underyling source contains point * features only, is * ```js * function(feature) { * return feature.getGeometry(); * } * ``` * See {@link module:ol/geom/Polygon~Polygon#getInteriorPoint} for a way to get a cluster * calculation point for polygons. * @property {VectorSource} source Source. * @property {boolean} [wrapX=true] Whether to wrap the world horizontally. */ /** * @classdesc * Layer source to cluster vector data. Works out of the box with point * geometries. For other geometry types, or if not all geometries should be * considered for clustering, a custom `geojsonFunction` can be defined. * @api */ declare class SuperCluster
extends VectorSource { protected resolution_?: number; protected extent_?: Extent; protected projection_?: Projection; protected view_: View; protected radius_: number; protected onDemandMode_: boolean; protected features_: Feature[]; protected cluster_?: Supercluster
; protected clusterFeatures_: Feature[]; protected geojsonFunction_: (feature: Feature) => Supercluster.PointFeature
;
protected source_: VectorSource;
/**
* @param {Options} options Cluster options.
*/
constructor(options: any);
/**
* Get the radius in pixels between clusters.
* @return {number} radius.
* @api
*/
getRadius(): number;
/**
* Get a reference to the wrapped source.
*
* @return {VectorSource} Source.
* @api
*/
getSource(): VectorSource