OpenLayers JavaScript Mapping Library |
OpenLayers. Layer.GridBase class for layers that use a lattice of tiles. Create a new grid layer with the OpenLayers.Layer.Grid constructor. Inherits fromSummary
clone
Create a clone of this layer Parameters
Returns{OpenLayers.Layer.Grid} An exact clone of this OpenLayers.Layer.Grid setTileSize
Check if we are in singleTile mode and if so, set the size as a ratio of the map size (as specified by the layer’s ‘ratio’ property). Parameters
getTilesBounds
Return the bounds of the tile grid. Returns{OpenLayers.Bounds} A Bounds object representing the bounds of all the currently loaded tiles (including those partially or not at all seen onscreen). addTile
Gives subclasses of Grid the opportunity to create an OpenLayer.Tile of their choosing. The implementer should initialize the new tile and take whatever steps necessary to display it. Parameters bounds - {OpenLayers.Bounds} Returns{OpenLayers.Tile} The added OpenLayers.Tile getTileBounds
Returns The tile bounds for a layer given a pixel location. Parameters
Returns{OpenLayers.Bounds} Bounds of the tile at the given pixel location. |
Deconstruct the layer and clear the grid.
destroy: function()
Create a clone of this layer
clone: function ( obj )
Check if we are in singleTile mode and if so, set the size as a ratio of the map size (as specified by the layer’s ‘ratio’ property).
setTileSize: function( size )
Return the bounds of the tile grid.
getTilesBounds: function()
Gives subclasses of Grid the opportunity to create an OpenLayer.Tile of their choosing.
addTile:function( bounds, position )
Returns The tile bounds for a layer given a pixel location.
getTileBounds: function( viewPortPx )