# OpenLayers.Layer.Image

Instances of OpenLayers.Layer.Image are used to display data from a web accessible image as a map layer. Create a new image layer with the OpenLayers.Layer.Image constructor.

#### Inherits from

- OpenLayers.Layer

Summary

OpenLayers.Layer.Image | Instances of OpenLayers.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 | {OpenLayers.Bounds} The image bounds in map units.
size | {OpenLayers.Size} The image size in pixels
tile | {OpenLayers.Tile.Image}
aspectRatio | {Float} The ratio of height/width represented by a single pixel in the graphic
Constructor |
OpenLayers.Layer.Image | 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)

### 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

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

{OpenLayers.Size} The image size in pixels

### tile

{OpenLayers.Tile.Image}

### aspectRatio

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

### Constructor

### OpenLayers.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 | {OpenLayers.Bounds} The extent represented by the image
size | {OpenLayers.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

#### Paramters

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

#### Returns

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

### setMap

> setMap: function( | map | )

#### Parameters

map | {OpenLayers.Map}

### moveTo

> moveTo:function( | bounds,
> | zoomChanged,
> | dragging | )

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

#### Parameters

bounds | {OpenLayers.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 | {OpenLayers.Tile}

### removeTileMonitoringHooks

> removeTileMonitoringHooks: function( | tile | )

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

#### Parameters

tile | {OpenLayers.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 | {OpenLayers.Bounds}

Instances of this class represent bounding boxes.
Instances of this class represent a width/height pair
Instances of OpenLayers.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 OpenLayers.Map are interactive maps embedded in a web page.
Close