rlayers
Version:
React Components for OpenLayers
76 lines • 3.36 kB
TypeScript
import React from 'react';
import { Map } from 'ol';
import Layer from 'ol/layer/Layer';
import Source from 'ol/source/Source';
import BaseVector from 'ol/layer/BaseVector';
import SourceVector from 'ol/source/Vector';
import LayerVectorTile from 'ol/layer/VectorTile';
import SourceVectorTile from 'ol/source/VectorTile';
import CanvasVectorLayerRenderer from 'ol/renderer/canvas/VectorLayer';
import CanvasVectorTileLayerRenderer from 'ol/renderer/canvas/VectorTileLayer';
import CanvasVectorImageLayerRenderer from 'ol/renderer/canvas/VectorImageLayer';
import WebGLPointsLayerRenderer from 'ol/renderer/webgl/PointsLayer';
import { Feature } from 'ol';
import { Coordinate } from 'ol/coordinate';
import Style from 'ol/style/Style';
import Geometry from 'ol/geom/Geometry';
import LayerRenderer from 'ol/renderer/Layer';
import { FeatureLike } from 'ol/Feature';
import RMap from './RMap';
import RLayer, { RLayerProps } from './layer/RLayer';
import RLayerBaseVector, { RLayerBaseVectorProps } from './layer/RLayerBaseVector';
import RFeature from './RFeature';
import RLayerVectorTile from './layer/RLayerVectorTile';
export declare const RContext: React.Context<RContextType>;
/**
* Context type
*/
export interface RContextType {
/** The current map */
readonly map?: Map;
/** The current layer */
readonly layer?: Layer<Source, LayerRenderer<any>>;
readonly source?: Source;
/** The current vector layer */
readonly vectorlayer?: BaseVector<FeatureLike, SourceVector<FeatureLike>, CanvasVectorLayerRenderer | CanvasVectorTileLayerRenderer | CanvasVectorImageLayerRenderer | WebGLPointsLayerRenderer>;
readonly vectorsource?: SourceVector;
readonly vectortilelayer?: LayerVectorTile<SourceVectorTile<FeatureLike>, FeatureLike>;
/** The current RFeature */
readonly feature?: FeatureLike;
/** The current location */
readonly location?: Coordinate;
/** The current style */
readonly style?: Style;
/** The current style array */
readonly styleArray?: Style[];
/** The current RMap component */
readonly rMap?: RMap;
/** The current RLayer component */
readonly rLayer?: RLayer<RLayerProps>;
/** The current RLayerVector component */
readonly rLayerVector?: RLayerBaseVector<FeatureLike, RLayerBaseVectorProps<FeatureLike>>;
/** The current RLayerVectorTile component */
readonly rLayerVectorTile?: RLayerVectorTile<FeatureLike>;
/** The current RFeature component */
readonly rFeature?: RFeature;
}
export declare function useOL(): {
map: Map;
layer: Layer<Source, LayerRenderer<any>>;
source: Source;
vectorlayer: BaseVector<FeatureLike, SourceVector<FeatureLike>, CanvasVectorLayerRenderer | CanvasVectorTileLayerRenderer | CanvasVectorImageLayerRenderer | WebGLPointsLayerRenderer>;
vectorsource: SourceVector<Feature<Geometry>>;
vectortilelayer: LayerVectorTile<SourceVectorTile<FeatureLike>, FeatureLike>;
feature: FeatureLike;
location: Coordinate;
style: Style;
styleArray: Style[];
};
export declare function useRLayersComponent(): {
rMap: RMap;
rLayer: RLayer<RLayerProps>;
rLayerVector: RLayerBaseVector<FeatureLike, RLayerBaseVectorProps<FeatureLike>>;
rLayerVectorTile: RLayerVectorTile<FeatureLike>;
rFeature: RFeature<Geometry>;
};
//# sourceMappingURL=context.d.ts.map