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. | 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 |
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. |
zeroPad | Create a zero padded string optionally with a radix for casting numbers. |
{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.
{OpenLayers.Size} This size of each tile. Defaults to 256 by 256 pixels.
{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
{String} Image type for the layer. This becomes the filename extension in tile requests. Default is “png” (generating a url like “http://example.com
{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)
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.
point | {OpenLayers.Geometry.Point} |
res | {Float} The resolution for which to compute the extent. |
{OpenLayers.Pixel} The x/y pixel corresponding to the position of the upper left tile 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.
extent | {OpenLayers.Bounds} The ‘suggested’ extent for the layer |
res | {Float} The resolution for which to compute the extent. |
{OpenLayers.Bounds} The actual extent of the tiles for the given zoom level
getUpperLeftTileCoord: function( res )
Calculates the x/y pixel corresponding to the position of the upper left tile for the given resolution.
res | {Float} The resolution for which to compute the extent. |
{OpenLayers.Pixel} 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.
res | {Float} The resolution for which to compute the extent. |
{OpenLayers.Pixel} 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.
res | {Float} The resolution for which to compute the extent. |
{OpenLayers.Bounds} The extent for this resolution
clone: function ( obj )
Returns an exact clone of this OpenLayers.Layer.ArcGISCache
[obj] | {Object} optional object to assign the cloned instance to. |
{OpenLayers.Layer.ArcGISCache} clone of this instance
getTileOrigin: function()
Determine the origin for aligning the grid of tiles. The origin will be derived from the layer’s <maxExtent> property.
{OpenLayers.LonLat} The tile origin.
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.
bounds | {OpenLayers.Bounds} |
{String} The URL for a tile based on given bounds.
zeroPad: function( num, len, radix )
Create a zero padded string optionally with a radix for casting numbers.
num | {Number} The number to be zero padded. |
len | {Number} The length of the string to be returned. |
radix | {Number} An integer between 2 and 36 specifying the base to use for representing numeric values. |
Calculates the x/y pixel corresponding to the position of the tile that contains the given point and for the for the given resolution.
getContainingTileCoords: function( point, 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.
calculateMaxExtentWithExtent: function( extent, res )
Calculates the x/y pixel corresponding to the position of the upper left tile for the given resolution.
getUpperLeftTileCoord: function( res )
Calculates the x/y pixel corresponding to the position of the lower right tile for the given resolution.
getLowerRightTileCoord: 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.
getMaxExtentForResolution: function( res )
Returns an exact clone of this OpenLayers.Layer.ArcGISCache
clone: function ( obj )
Get this layer’s maximum extent.
getMaxExtent: function()
Determine the origin for aligning the grid of tiles.
getTileOrigin: function()
Determine the URL for a tile given the tile bounds.
getURL: function ( bounds )
Create a zero padded string optionally with a radix for casting numbers.
zeroPad: function( num, len, radix )