ALKMaps.Layer.Image

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.

Inherits from

Summary
ALKMaps.Layer.ImageInstances 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.Layer.ImageCreate a new image layer
Functions
destroyDestroy this layer
cloneCreate a clone of this layer
setMap
moveToCreate the tile for the image or resize it for the new resolution
addTileMonitoringHooksThis 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.
removeTileMonitoringHooksThis function takes a tile as input and removes the tile hooks that were added in addTileMonitoringHooks.
setUrl
getURLThe 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)

Properties

isBaseLayer

{Boolean} The layer is a base layer.  Default is true.  Set this property in the layer options

url

{String} URL of the image to use

extent

{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).

size

{ALKMaps.Size} The image size in pixels

aspectRatio

{Float} The ratio of height/width represented by a single pixel in the graphic

Constructor

ALKMaps.Layer.Image

Create a new image layer

Parameters

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

Functions

destroy

destroy: function()

Destroy this layer

clone

clone: function(obj)

Create a clone of this layer

Parameters

obj{Object} An optional layer (is this ever used?)

Returns

{ALKMaps.Layer.Image} An exact copy of this layer

setMap

setMap: function(map)

Parameters

map{ALKMaps.Map}

moveTo

moveTo:function(bounds,
zoomChanged,
dragging)

Create the tile for the image or resize it for the new resolution

Parameters

bounds{ALKMaps.Bounds}
zoomChanged{Boolean}
dragging{Boolean}

addTileMonitoringHooks

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.

Parameters

tile{ALKMaps.Tile}

removeTileMonitoringHooks

removeTileMonitoringHooks: function(tile)

This function takes a tile as input and removes the tile hooks that were added in addTileMonitoringHooks.

Parameters

tile{ALKMaps.Tile}

setUrl

setUrl: function(newUrl)

Parameters

newUrl{String}

getURL

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)

Parameters

bounds{ALKMaps.Bounds}
Instances of this class represent bounding boxes.
Instances of this class represent a width/height pair
Instances of ALKMaps.Tile.Image are used to manage the image tiles used by various layers.
destroy: function()
Destroy this layer
clone: function(obj)
Create a clone of this layer
setMap: function(map)
moveTo:function(bounds,
zoomChanged,
dragging)
Create the tile for the image or resize it for the new resolution
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.
removeTileMonitoringHooks: function(tile)
This function takes a tile as input and removes the tile hooks that were added in addTileMonitoringHooks.
setUrl: function(newUrl)
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)
Create a new image layer
Instances of ALKMaps.Map are interactive maps embedded in a web page.
This is a class designed to designate a single tile, however it is explicitly designed to do relatively little.
Close