ol
Version:
OpenLayers mapping library
103 lines • 3.45 kB
TypeScript
export default Static;
export type Options = {
/**
* Attributions.
*/
attributions?: string | string[] | ((arg0: import("../PluggableMap.js").FrameState) => string | string[]);
/**
* The `crossOrigin` attribute for loaded images. Note that
* you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
* See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
*/
crossOrigin?: string;
/**
* Extent of the image in map coordinates.
* This is the [left, bottom, right, top] map coordinates of your image.
*/
imageExtent?: number[];
/**
* Optional function to load an image given a URL.
*/
imageLoadFunction?: (arg0: ImageWrapper, arg1: string) => void;
/**
* Projection. Default is the view projection.
*/
projection?: string | import("../proj/Projection.js").default;
/**
* Size of the image in pixels. Usually the image size is auto-detected, so this
* only needs to be set if auto-detection fails for some reason.
*/
imageSize?: number[];
/**
* Image URL.
*/
url: string;
};
/**
* @typedef {Object} Options
* @property {import("./Source.js").AttributionLike} [attributions] Attributions.
* @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
* you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
* See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
* @property {import("../extent.js").Extent} [imageExtent] Extent of the image in map coordinates.
* This is the [left, bottom, right, top] map coordinates of your image.
* @property {import("../Image.js").LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.
* @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection.
* @property {import("../size.js").Size} [imageSize] Size of the image in pixels. Usually the image size is auto-detected, so this
* only needs to be set if auto-detection fails for some reason.
* @property {string} url Image URL.
*/
/**
* @classdesc
* A layer source for displaying a single, static image.
* @api
*/
declare class Static extends ImageSource {
/**
* @param {Options} options ImageStatic options.
*/
constructor(options: Options);
/**
* @private
* @type {string}
*/
private url_;
/**
* @private
* @type {import("../extent.js").Extent}
*/
private imageExtent_;
/**
* @private
* @type {import("../Image.js").default}
*/
private image_;
/**
* @private
* @type {import("../size.js").Size}
*/
private imageSize_;
/**
* Returns the image extent
* @return {import("../extent.js").Extent} image extent.
* @api
*/
getImageExtent(): number[];
/**
* @inheritDoc
*/
getImageInternal(extent: any, resolution: any, pixelRatio: any, projection: any): ImageWrapper;
/**
* Return the URL used for this image source.
* @return {string} URL.
* @api
*/
getUrl(): string;
/**
* @inheritDoc
*/
handleImageChange(evt: any): void;
}
import ImageWrapper from "../Image.js";
import ImageSource from "./Image.js";
//# sourceMappingURL=ImageStatic.d.ts.map