ol/source/static
Functions
-
createLoader(options){ImageObjectPromiseLoader}
-
import {createLoader} from 'ol/source/static';Creates a loader for static images.
Name Type Description crossOriginnull | string | undefined The
crossOriginattribute for loaded images. Note that you must provide acrossOriginvalue 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.referrerPolicyReferrerPolicy | undefined The
referrerPolicyproperty for loaded images.imageExtentExtent Extent of the image in map coordinates. This is the [left, bottom, right, top] map coordinates of your image. When using this loader with an
ol/source/Image, the same extent must be set asextentof theol/layer/Image.urlstring Image URL.
loadfunction | undefined Function to perform loading of the image. Receives the created
HTMLImageElementand the desiredsrcas argument and returns a promise resolving to the loaded or decoded image. Default isdecode.Returns:
Loader.
Type Definitions
-
LoaderOptions{Object}
-
Properties:
Name Type Description crossOriginnull | string | undefined The
crossOriginattribute for loaded images. Note that you must provide acrossOriginvalue 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.referrerPolicyReferrerPolicy | undefined The
referrerPolicyproperty for loaded images.imageExtentExtent Extent of the image in map coordinates. This is the [left, bottom, right, top] map coordinates of your image. When using this loader with an
ol/source/Image, the same extent must be set asextentof theol/layer/Image.urlstring Image URL.
loadfunction | undefined Function to perform loading of the image. Receives the created
HTMLImageElementand the desiredsrcas argument and returns a promise resolving to the loaded or decoded image. Default isdecode.
© 2005-present, OpenLayers Contributors All rights reserved.Licensed under the BSD 2-Clause License.
https://openlayers.org/en/latest/apidoc/module-ol_source_static.html