rlayers
Version:
React Components for OpenLayers
35 lines • 1.14 kB
TypeScript
import LayerImage from 'ol/layer/Image';
import SourceImage from 'ol/source/ImageStatic';
import { ProjectionLike } from 'ol/proj';
import { Extent } from 'ol/extent';
import { Size } from 'ol/size';
import React from 'react';
import { RContextType } from '../context';
import { default as RLayer, RLayerProps } from './RLayer';
/**
* @propsfor RLayerImage
*/
export interface RLayerImageProps extends RLayerProps {
/** url of the image */
url: string;
/** Extent of the map, cannot be dynamically modified */
extent: Extent;
/**
* Projection for the returned coordinates
* @default viewProjection
*/
projection?: ProjectionLike;
/** image size if the auto-detection fails */
size?: Size;
}
/**
* A layer that renders a static image
*/
export default class RLayerImage extends RLayer<RLayerImageProps> {
ol: LayerImage<SourceImage>;
source: SourceImage;
constructor(props: Readonly<RLayerImageProps>, context?: React.Context<RContextType>);
protected createSource(): void;
protected refresh(prevProps?: RLayerImageProps): void;
}
//# sourceMappingURL=RLayerImage.d.ts.map