"Remove unused 'tileOrigin' code from TileCache layer", (Closes #1076). Though
the idea behind this is good, having the code here and unused is not the right thing to do. (See #1302) for a better attempt at what this should actually be. The reason this code exists is almost certainly a carggocult from Layer.TMS, which *does* have a tileOrigin, and I'm pretty sure tschaub started by copying from that. r=me, though it's mostly just docs. git-svn-id: http://svn.openlayers.org/trunk/openlayers@8930 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -27,13 +27,6 @@ OpenLayers.Layer.TileCache = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
||||
*/
|
||||
isBaseLayer: true,
|
||||
|
||||
/**
|
||||
* APIProperty: tileOrigin
|
||||
* {<OpenLayers.LonLat>} Location of the tile lattice origin. Default is
|
||||
* bottom left of the maxExtent.
|
||||
*/
|
||||
tileOrigin: null,
|
||||
|
||||
/**
|
||||
* APIProperty: format
|
||||
* {String} Mime type of the images returned. Default is image/png.
|
||||
@@ -157,22 +150,6 @@ OpenLayers.Layer.TileCache = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
||||
return new OpenLayers.Tile.Image(this, position, bounds,
|
||||
url, this.tileSize);
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: setMap
|
||||
* When the layer is added to a map, then we can fetch our origin
|
||||
* (if we don't have one.)
|
||||
*
|
||||
* Parameters:
|
||||
* map - {<OpenLayers.Map>}
|
||||
*/
|
||||
setMap: function(map) {
|
||||
OpenLayers.Layer.Grid.prototype.setMap.apply(this, arguments);
|
||||
if (!this.tileOrigin) {
|
||||
this.tileOrigin = new OpenLayers.LonLat(this.map.maxExtent.left,
|
||||
this.map.maxExtent.bottom);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
CLASS_NAME: "OpenLayers.Layer.TileCache"
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user