OpenLayers JavaScript Mapping Library |
OpenLayers.TileThis is a class designed to designate a single tile, however it is explicitly designed to do relatively little. Tiles store information about themselves -- such as the URL that they are related to, and their size - but do not add themselves to the layer div automatically, for example. Create a new tile with the OpenLayers.Tile constructor, or a subclass.
Summary
events{OpenLayers.Events} An events object that handles all events on the tile. layer{OpenLayers.Layer} layer the tile is attached to bounds{OpenLayers.Bounds} null size{OpenLayers.Size} null position{OpenLayers.Pixel} Top Left pixel of the tile OpenLayers.TileConstructor for a new OpenLayers.Tile instance. Parameters
draw
Clear whatever is currently in the tile, then return whether or not it should actually be re-drawn. Returns{Boolean} Whether or not the tile should actually be drawn. Note that this is not really the best way of doing things, but such is the way the code has been developed. Subclasses call this and depend on the return to know if they should draw or not. moveTo
Reposition the tile. Parameters
getBoundsFromBaseLayer
Take the pixel locations of the corner of the tile, and pass them to the base layer and ask for the location of those pixels, so that displaying tiles over Google works fine. Parameters
Returns
|
Nullify references to prevent circular references and memory leaks.
destroy:function()
Clear whatever is currently in the tile, then return whether or not it should actually be re-drawn.
draw: function()
Reposition the tile.
moveTo: function ( bounds, position, redraw )
Clear the tile of any bounds/position-related data so that it can be reused in a new location.
clear: function()
Take the pixel locations of the corner of the tile, and pass them to the base layer and ask for the location of those pixels, so that displaying tiles over Google works fine.
getBoundsFromBaseLayer: function( position )