Functions
-
import {createLoader} from 'ol/source/ogcMapUtil';Creates a loader for OGC Map 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.hidpiboolean (defaults to true) Use the
ol/Map#pixelRatiovalue when requesting the image from the remote server.paramsObject.<string, *> | undefined OGC Map request parameters. No param is required by default.
width,height,bbox,crsandbbox-crswill be set dynamically.projectionProjectionLike | undefined Projection. Default is 'EPSG:3857'.
rationumber (defaults to 1.5) Ratio.
1means image requests are the size of the map viewport,2means twice the width and height of the map viewport, and so on. Must be1or higher.urlstring OGC Map service 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.hidpiboolean
(defaults to true)Use the
ol/Map#pixelRatiovalue when requesting the image from the remote server.paramsObject.<string, *> | undefined OGC Map request parameters. No param is required by default.
width,height,bbox,crsandbbox-crswill be set dynamically.projectionProjectionLike | undefined Projection. Default is 'EPSG:3857'.
rationumber
(defaults to 1.5)Ratio.
1means image requests are the size of the map viewport,2means twice the width and height of the map viewport, and so on. Must be1or higher.urlstring OGC Map service 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.