Class: ImageArcGISRest

ol/source/ImageArcGISRest~ImageArcGISRest


import ImageArcGISRest from 'ol/source/ImageArcGISRest';

Source for data from ArcGIS Rest services providing single, untiled images. Useful when underlying map service has labels.

If underlying map service is not using labels, take advantage of ol image caching and use module:ol/source/TileArcGISRest data source.

new ImageArcGISRest(opt_options)

source/ImageArcGISRest.js, line 54
Name Type Description
options

Image ArcGIS Rest Options.

Name Type Default Description
attributions module:ol/source/Source~AttributionLike

Attributions.

crossOrigin null | string

The crossOrigin attribute for loaded images. Note that you must provide a crossOrigin value if you are using the WebGL renderer or if you want to access pixel data with the Canvas renderer. See href="https://developer.mozilla.org/en-US/docs/Web/HTML/CORS%5C_enabled%5C_image%7D">https://developer.mozilla.org/en-US/docs/Web/HTML/CORS\_enabled\_image for more detail.

hidpi boolean true

Use the ol/Map#pixelRatio value when requesting the image from the remote server.

imageLoadFunction module:ol/Image~LoadFunction

Optional function to load an image given a URL.

params Object.<string, *>

ArcGIS Rest parameters. This field is optional. Service defaults will be used for any fields not specified. FORMAT is PNG32 by default. F is IMAGE by default. TRANSPARENT is true by default. BBOX, SIZE, BBOXSR, and IMAGESR will be set dynamically. Set LAYERS to override the default service layer visibility. See href="http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export%5C_Map/02r3000000v7000000/%7D">http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export\_Map/02r3000000v7000000/ for further reference.

projection module:ol/proj~ProjectionLike

Projection.

ratio number 1.5

Ratio. 1 means image requests are the size of the map viewport, 2 means twice the size of the map viewport, and so on.

resolutions Array.<number>

Resolutions. If specified, requests will be made for these resolutions only.

url string

ArcGIS Rest service URL for a Map Service or Image Service. The url should include /MapServer or /ImageServer.

Fires:

Extends

Methods

getImageLoadFunction(){module:ol/Image~LoadFunction}

source/ImageArcGISRest.js, line 213

Return the image load function of the source.

Returns:
The image load function.

getParams(){Object}

source/ImageArcGISRest.js, line 134

Get the user-provided params, i.e. those passed to the constructor through the "params" option, and possibly updated using the updateParams method.

Returns:
Params.

getProjection(){module:ol/proj/Projection~Projection} inherited

source/Source.js, line 119

Get the projection of the source.

Returns:
Projection.

getState(){module:ol/source/State} inherited

source/Source.js, line 136

Get the state of the source, see module:ol/source/State~State for possible states.

Returns:
State.

getUrl(){string|undefined}

source/ImageArcGISRest.js, line 252

Return the URL used for this ArcGIS source.

Returns:
URL.

refresh() inherited

source/Source.js, line 151

Refreshes the source and finally dispatches a 'change' event.

setAttributions(attributions) inherited

source/Source.js, line 162

Set the attributions of the source.

Name Type Description
attributions module:ol/source/Source~AttributionLike | undefined

Attributions. Can be passed as string, Array<string>, module:ol/source/Source&tilde;Attribution, or undefined.

setImageLoadFunction(imageLoadFunction)

source/ImageArcGISRest.js, line 261

Set the image load function of the source.

Name Type Description
imageLoadFunction module:ol/Image~LoadFunction

Image load function.

setUrl(url)

source/ImageArcGISRest.js, line 272

Set the URL to use for requests.

Name Type Description
url string | undefined

URL.

updateParams(params)

source/ImageArcGISRest.js, line 285

Update the user-provided params.

Name Type Description
params Object

Params.