# ArcGISCache.js

Summary

ArcGISCache.js |
Properties |
url | {String | Array} The base URL for the layer cache.
tileOrigin | {OpenLayers.LonLat} The location of the tile origin for the cache.
tileSize | {OpenLayers.Size} This size of each tile.
useAGS | {Boolean} Indicates if we are going to be accessing the ArcGIS Server (AGS) cache via an AGS MapServer or directly through HTTP.
type | {String} Image type for the layer.
useScales | {Boolean} Optional override to indicate that the layer should use ‘scale’ information returned from the server capabilities object instead of ‘resolution’ information.
overrideDPI | {Boolean} Optional override to change the OpenLayers.DOTS_PER_INCH setting based on the tile information in the server capabilities object.
Constructor |
OpenLayers.Layer.ArcGISCache | Creates a new instance of this class
Functions |
getContainingTileCoords | Calculates the x/y pixel corresponding to the position of the tile that contains the given point and for the for the given resolution.
calculateMaxExtentWithExtent | Given a ‘suggested’ max extent from the server, this function uses information about the actual tile sizes to determine the actual extent of the layer.
getUpperLeftTileCoord | Calculates the x/y pixel corresponding to the position of the upper left tile for the given resolution.
getLowerRightTileCoord | Calculates the x/y pixel corresponding to the position of the lower right tile for the given resolution.
getMaxExtentForResolution | Since the max extent of a set of tiles can change from zoom level to zoom level, we need to be able to calculate that max extent for a given resolution.
clone | Returns an exact clone of this OpenLayers.Layer.ArcGISCache
initGriddedTiles |
getMaxExtent | Get this layer’s maximum extent.
getTileOrigin | Determine the origin for aligning the grid of tiles.
getURL | Determine the URL for a tile given the tile bounds.

### Properties

### url

{String | Array} The base URL for the layer cache. You can also provide a list of URL strings for the layer if your cache is available from multiple origins. This must be set before the layer is drawn.

### tileOrigin

{OpenLayers.LonLat} The location of the tile origin for the cache. An ArcGIS cache has it’s origin at the upper-left (lowest x value and highest y value of the coordinate system). The units for the tile origin should be the same as the units for the cached data.

### tileSize

{OpenLayers.Size} This size of each tile. Defaults to 256 by 256 pixels.

### useAGS

{Boolean} Indicates if we are going to be accessing the ArcGIS Server (AGS) cache via an AGS MapServer or directly through HTTP. When accessing via AGS the path structure uses a standard z/y/x structure. But AGS actually stores the tile images on disk using a hex based folder structure that looks like “http://example.com/mylayer/L00/R00000000/C00000000.png”. Learn more about this here: http://blogs.esri.com/Support/blogs/mappingcenter/archive/2010/08/20/Checking-Your-Local-Cache-Folders.aspx Defaults to true;

### type

{String} Image type for the layer. This becomes the filename extension in tile requests. Default is “png” (generating a url like “http://example.com/mylayer/L00/R00000000/C00000000.png”).

### useScales

{Boolean} Optional override to indicate that the layer should use ‘scale’ information returned from the server capabilities object instead of ‘resolution’ information. This can be important if your tile server uses an unusual DPI for the tiles.

### overrideDPI

{Boolean} Optional override to change the OpenLayers.DOTS_PER_INCH setting based on the tile information in the server capabilities object. This can be useful if your server has a non-standard DPI setting on its tiles, and you’re only using tiles with that DPI. This value is used while OpenLayers is calculating resolution using scales, and is not necessary if you have resolution information. (This is typically the case) Regardless, this setting can be useful, but is dangerous because it will impact other layers while calculating resolution. Only use this if you know what you are doing. (See OpenLayers.Util.getResolutionFromScale)

### Constructor

### OpenLayers.Layer.ArcGISCache

Creates a new instance of this class

#### Parameters

name | {String}
url | {String}
options | {Object} extra layer options

### Functions

### getContainingTileCoords

> getContainingTileCoords: function( | point,
> | res | )

Calculates the x/y pixel corresponding to the position of the tile that contains the given point and for the for the given resolution.

#### Parameters

point | {OpenLayers.Geometry.Point}
res | {Float} The resolution for which to compute the extent.

#### Returns

{OpenLayers.Pixel} The x/y pixel corresponding to the position of the upper left tile for the given resolution.

### calculateMaxExtentWithExtent

> calculateMaxExtentWithExtent: function( | extent,
> | res | )

Given a ‘suggested’ max extent from the server, this function uses information about the actual tile sizes to determine the actual extent of the layer.

#### Parameters

extent | {OpenLayers.Bounds} The ‘suggested’ extent for the layer
res | {Float} The resolution for which to compute the extent.

#### Returns

{OpenLayers.Bounds} The actual extent of the tiles for the given zoom level

### getUpperLeftTileCoord

> getUpperLeftTileCoord: function( | res | )

Calculates the x/y pixel corresponding to the position of the upper left tile for the given resolution.

#### Parameters

res | {Float} The resolution for which to compute the extent.

#### Returns

{OpenLayers.Pixel} The x/y pixel corresponding to the position of the upper left tile for the given resolution.

### getLowerRightTileCoord

> getLowerRightTileCoord: function( | res | )

Calculates the x/y pixel corresponding to the position of the lower right tile for the given resolution.

#### Parameters

res | {Float} The resolution for which to compute the extent.

#### Returns

{OpenLayers.Pixel} The x/y pixel corresponding to the position of the lower right tile for the given resolution.

### getMaxExtentForResolution

> getMaxExtentForResolution: function( | res | )

Since the max extent of a set of tiles can change from zoom level to zoom level, we need to be able to calculate that max extent for a given resolution.

#### Parameters

res | {Float} The resolution for which to compute the extent.

#### Returns

{OpenLayers.Bounds} The extent for this resolution

### clone

> clone: function ( | obj | )

Returns an exact clone of this OpenLayers.Layer.ArcGISCache

#### Parameters

[obj] | {Object} optional object to assign the cloned instance to.

#### Returns

{OpenLayers.Layer.ArcGISCache} clone of this instance

### initGriddedTiles

> initGriddedTiles: function( | bounds | )

#### Parameters

bounds | {OpenLayers.Bounds}

### getMaxExtent

> getMaxExtent: function()

Get this layer’s maximum extent.

#### Returns

{OpenLayers.Bounds}

### getTileOrigin

> getTileOrigin: function()

Determine the origin for aligning the grid of tiles. The origin will be derived from the layer’s <maxExtent> property.

#### Returns

{OpenLayers.LonLat} The tile origin.

### getURL

> getURL: function ( | bounds | )

Determine the URL for a tile given the tile bounds. This is should support urls that access tiles through an ArcGIS Server MapServer or directly through the hex folder structure using HTTP. Just be sure to set the useArcGISServer property appropriately! This is basically the same as ‘OpenLayers.Layer.TMS.getURL’, but with the addition of hex addressing, and tile rounding.

#### Parameters

bounds | {OpenLayers.Bounds}

#### Returns

{String} The URL for a tile based on given bounds.

This class represents a longitude and latitude pair
Instances of this class represent a width/height pair

> getContainingTileCoords: function( | point,
> | res | )

Calculates the x/y pixel corresponding to the position of the tile that contains the given point and for the for the given resolution.

> calculateMaxExtentWithExtent: function( | extent,
> | res | )

Given a ‘suggested’ max extent from the server, this function uses information about the actual tile sizes to determine the actual extent of the layer.

> getUpperLeftTileCoord: function( | res | )

Calculates the x/y pixel corresponding to the position of the upper left tile for the given resolution.

> getLowerRightTileCoord: function( | res | )

Calculates the x/y pixel corresponding to the position of the lower right tile for the given resolution.

> getMaxExtentForResolution: function( | res | )

Since the max extent of a set of tiles can change from zoom level to zoom level, we need to be able to calculate that max extent for a given resolution.

> clone: function ( | obj | )

Returns an exact clone of this OpenLayers.Layer.ArcGISCache

> initGriddedTiles: function( | bounds | )

> getMaxExtent: function()

Get this layer’s maximum extent.

> getTileOrigin: function()

Determine the origin for aligning the grid of tiles.

> getURL: function ( | bounds | )

Determine the URL for a tile given the tile bounds.
Point geometry class.
This class represents a screen coordinate, in x and y coordinates
Instances of this class represent bounding boxes.
Creates a new instance of this class
Close