Functions
-
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.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.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.