rlayers
Version:
React Components for OpenLayers
42 lines • 1.52 kB
TypeScript
import { Feature } from 'ol';
import { Heatmap as LayerHeatmap } from 'ol/layer';
import { Vector as SourceVector } from 'ol/source';
import BaseObject from 'ol/Object';
import { Point } from 'ol/geom';
import { default as RLayerBaseVector, RLayerBaseVectorProps } from './RLayerBaseVector';
import RenderFeature from 'ol/render/Feature';
import JSONFeature from 'ol/format/JSONFeature';
type OLFeaturePoint = RenderFeature extends ReturnType<JSONFeature['readFeatures']>[0] ? Feature<Point> : Point;
/**
* @propsfor RLayerHeatmap
*/
export interface RLayerHeatmapProps extends RLayerBaseVectorProps<OLFeaturePoint> {
/** Blurring */
blur?: number;
/** Radius */
radius?: number;
/** Weight function for each RFeature, weight goes from 0 to 1 */
weight?: (f: Feature<Point>) => number;
/**
* OpenLayers features that will be loaded
*
* this property currently does not support dynamic updates
*/
features?: Feature<Point>[];
}
/** A vector layer that renders its RFeatures as a heatmap
*
* Compatible with RLayerVector
*
* Requires an `RMap` context
*
* Provides a vector layer for JSX-declared RFeatures
*/
export default class RLayerHeatmap extends RLayerBaseVector<OLFeaturePoint, RLayerHeatmapProps> {
ol: LayerHeatmap;
source: SourceVector<OLFeaturePoint>;
protected createSource(props: Readonly<RLayerHeatmapProps>): BaseObject[];
protected refresh(prev?: RLayerHeatmapProps): void;
}
export {};
//# sourceMappingURL=RLayerHeatmap.d.ts.map