Instances of ALKMaps.Layer.Image are used to display data from a web accessible image as a map layer. Create a new image layer with the ALKMaps.Layer.Image constructor.
ALKMaps. | Instances of ALKMaps.Layer.Image are used to display data from a web accessible image as a map layer. |
Properties | |
isBaseLayer | {Boolean} The layer is a base layer. |
url | {String} URL of the image to use |
extent | {ALKMaps.Bounds} The image bounds in map units. |
size | {ALKMaps.Size} The image size in pixels |
tile | {ALKMaps.Tile.Image} |
aspectRatio | {Float} The ratio of height/width represented by a single pixel in the graphic |
Constructor | |
ALKMaps. | Create a new image layer |
Functions | |
destroy | Destroy this layer |
clone | Create a clone of this layer |
setMap | |
moveTo | Create the tile for the image or resize it for the new resolution |
addTileMonitoringHooks | This function takes a tile as input and adds the appropriate hooks to the tile so that the layer can keep track of the loading tiles. |
removeTileMonitoringHooks | This function takes a tile as input and removes the tile hooks that were added in addTileMonitoringHooks. |
setUrl | |
getURL | The url we return is always the same (the image itself never changes) so we can ignore the bounds parameter (it will always be the same, anyways) |
{ALKMaps.Bounds} The image bounds in map units. This extent will also be used as the default maxExtent for the layer. If you wish to have a maxExtent that is different than the image extent, set the maxExtent property of the options argument (as with any other layer).
{ALKMaps.Size} The image size in pixels
Create a new image layer
name | {String} A name for the layer. |
url | {String} Relative or absolute path to the image |
extent | {ALKMaps.Bounds} The extent represented by the image |
size | {ALKMaps.Size} The size (in pixels) of the image |
options | {Object} Hashtable of extra options to tag onto the layer |
clone: function( obj )
Create a clone of this layer
obj | {Object} An optional layer (is this ever used?) |
{ALKMaps.Layer.Image} An exact copy of this layer
moveTo:function( bounds, zoomChanged, dragging )
Create the tile for the image or resize it for the new resolution
bounds | {ALKMaps.Bounds} |
zoomChanged | {Boolean} |
dragging | {Boolean} |
addTileMonitoringHooks: function( tile )
This function takes a tile as input and adds the appropriate hooks to the tile so that the layer can keep track of the loading tiles.
tile | {ALKMaps.Tile} |
removeTileMonitoringHooks: function( tile )
This function takes a tile as input and removes the tile hooks that were added in addTileMonitoringHooks.
tile | {ALKMaps.Tile} |
getURL: function( bounds )
The url we return is always the same (the image itself never changes) so we can ignore the bounds parameter (it will always be the same, anyways)
bounds | {ALKMaps.Bounds} |
Destroy this layer
destroy: function()
Create a clone of this layer
clone: function( obj )
setMap: function( map )
Create the tile for the image or resize it for the new resolution
moveTo:function( bounds, zoomChanged, dragging )
This function takes a tile as input and adds the appropriate hooks to the tile so that the layer can keep track of the loading tiles.
addTileMonitoringHooks: function( tile )
This function takes a tile as input and removes the tile hooks that were added in addTileMonitoringHooks.
removeTileMonitoringHooks: function( tile )
setUrl: function( newUrl )
The url we return is always the same (the image itself never changes) so we can ignore the bounds parameter (it will always be the same, anyways)
getURL: function( bounds )