UNPKG

rlayers

Version:

React Components for OpenLayers

40 lines 1.39 kB
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'; /** * @propsfor RLayerHeatmap */ export interface RLayerHeatmapProps extends RLayerBaseVectorProps<Feature<Point>> { /** 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. * * Prefer using nested JSX <RFeature> components in this case. */ 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<Feature<Point>, RLayerHeatmapProps> { ol: LayerHeatmap<Feature<Point>>; source: SourceVector<Feature<Point>>; protected createSource(props: Readonly<RLayerHeatmapProps>): BaseObject[]; protected refresh(prev?: RLayerHeatmapProps): void; } //# sourceMappingURL=RLayerHeatmap.d.ts.map