Functions
-
import {createImageLoadFunction} from 'ol/http';Creates an
imageLoadFunction(e.g. forol/source/ImageStatic) that attaches the headers returned by the given function to the image requests. Seeloadfor details.Name Type Description getHeadersGetHeadersFn Returns the headers to send for a URL.
onErrorOnErrorFn | null | undefined Called when a request failed.
Returns:
The image load function.
-
import {createTileLoadFunction} from 'ol/http';Creates a
tileLoadFunctionfor image tile sources (e.g.ol/source/XYZ) that attaches the headers returned by the given function to the tile requests. The headers are requested per tile URL. Seeloadfor details.Name Type Description getHeadersGetHeadersFn Returns the headers to send for a URL.
onErrorOnErrorFn | null | undefined Called when a request failed.
Returns:
The tile load function.
Type Definitions
-
A function that returns the HTTP headers to send for the given URL, or
nullif no additional headers should be sent. -
A function that is called when a request has failed.