Class: TileArcGISRest

ol/source/TileArcGISRest~TileArcGISRest


import TileArcGISRest from 'ol/source/TileArcGISRest';

Layer source for tile data from ArcGIS Rest services. Map and Image Services are supported.

For cached ArcGIS services, better performance is available using the module:ol/source/XYZ~XYZ data source.

new TileArcGISRest(opt_options)

source/TileArcGISRest.js, line 63
Name Type Description
options

Tile ArcGIS Rest options.

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

Attributions.

cacheSize number 2048

Cache size.

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 https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.

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 http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export_Map/02r3000000v7000000/ for further reference.

tileGrid module:ol/tilegrid/TileGrid~TileGrid

Tile grid. Base this on the resolutions, tilesize and extent supported by the server. If this is not defined, a default grid will be used: if there is a projection extent, the grid will be based on that; if not, a grid based on a global extent with origin at 0,0 will be used.

projection module:ol/proj~ProjectionLike

Projection.

reprojectionErrorThreshold number 0.5

Maximum allowed reprojection error (in pixels). Higher values can increase reprojection performance, but decrease precision.

tileLoadFunction module:ol/Tile~LoadFunction

Optional function to load a tile given a URL. The default is

function(imageTile, src) {
  imageTile.getImage().src = src;
};
url string

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

wrapX boolean true

Whether to wrap the world horizontally.

transition number

Duration of the opacity transition for rendering. To disable the opacity transition, pass transition: 0.

urls Array.<string>

ArcGIS Rest service urls. Use this instead of url when the ArcGIS Service supports multiple urls for export requests.

Fires:

Extends

Methods

getParams(){Object}

source/TileArcGISRest.js, line 120

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.

setRenderReprojectionEdges(render) inherited

source/TileImage.js, line 356

Sets whether to render reprojection edges or not (usually for debugging).

Name Type Description
render boolean

Render the edges.

setTileGridForProjection(projection, tilegrid) inherited

source/TileImage.js, line 380

Sets the tile grid to use when reprojecting the tiles to the given projection instead of the default tile grid for the projection.

This can be useful when the default tile grid cannot be created (e.g. projection has no extent defined) or for optimization reasons (custom tile size, resolutions, ...).

Name Type Description
projection module:ol/proj~ProjectionLike

Projection.

tilegrid module:ol/tilegrid/TileGrid~TileGrid

Tile grid to use for the projection.

updateParams(params)

source/TileArcGISRest.js, line 178

Update the user-provided params.

Name Type Description
params Object

Params.