OpenLayers. Tile. Image

Instances of OpenLayers.Tile.Image are used to manage the image tiles used by various layers.  Create a new image tile with the OpenLayers.Tile.Image constructor.

Inherits from

Summary
Instances of OpenLayers.Tile.Image are used to manage the image tiles used by various layers.
{String} The URL of the image being requested.
{DOMElement} The div element which wraps the image.
{DOMElement} The image element is appended to the frame.
Constructor for a new OpenLayers.Tile.Image instance.
nullify references to prevent circular references and memory leaks
Check that a tile should be drawn, and draw it.
Clear the tile of any bounds/position-related data so that it can be reused in a new location.
Creates the imgDiv property on the tile.
Make sure that the image that just loaded is the one this tile is meant to display, since panning/zooming might have changed the tile’s URL in the meantime.

Properties

url

{String} The URL of the image being requested.  No default.  Filled in by layer.getURL() function.

imgDiv

{DOMElement} The div element which wraps the image.

frame

{DOMElement} The image element is appended to the frame.  Any gutter on the image will be hidden behind the frame.

Constructor

OpenLayers. Tile. Image

Constructor for a new OpenLayers.Tile.Image instance.

Parameters

layer{OpenLayers.Layer} layer that the tile will go in.
position{OpenLayers.Pixel}
bounds{OpenLayers.Bounds}
url{<String>} Deprecated.  Remove me in 3.0.
size{OpenLayers.Size}

Functions

destroy

destroy: function()

nullify references to prevent circular references and memory leaks

draw

draw:function()

Check that a tile should be drawn, and draw it.

Returns

{Boolean} Always returns true.

clear

clear: function()

Clear the tile of any bounds/position-related data so that it can be reused in a new location.

initImgDiv

initImgDiv: function()

Creates the imgDiv property on the tile.

checkImgURL

checkImgURL: function ()

Make sure that the image that just loaded is the one this tile is meant to display, since panning/zooming might have changed the tile’s URL in the meantime.  If the tile URL did change before the image loaded, set the imgDiv display to ‘none’, as either (a) it will be reset to visible when the new URL loads in the image, or (b) we don’t want to display this tile after all because its new bounds are outside our maxExtent.

This function should no longer be neccesary with the improvements to Grid.js in OpenLayers 2.3.  The lack of a good isEquivilantURL function caused problems in 2.2, but it’s possible that with the improved isEquivilant URL function, this might be neccesary at some point.

See discussion in the thread at http://openlayers.org- /pipermail- /dev- /2007-January- /000205.html

Constructor for a new OpenLayers.Tile.Image instance.
destroy: function()
nullify references to prevent circular references and memory leaks
draw:function()
Check that a tile should be drawn, and draw it.
clear: function()
Clear the tile of any bounds/position-related data so that it can be reused in a new location.
initImgDiv: function()
Creates the imgDiv property on the tile.
checkImgURL: function ()
Make sure that the image that just loaded is the one this tile is meant to display, since panning/zooming might have changed the tile’s URL in the meantime.
This is a class designed to designate a single tile, however it is explicitly designed to do relatively little.
This class represents a screen coordinate, in x and y coordinates
Instances of this class represent bounding boxes.
Instances of this class represent a width/height pair