Changed constructor for bounds to take minlon, minlat, maxlon, maxlat as its arguments. changed all related usage and comments
git-svn-id: http://svn.openlayers.org/trunk/openlayers@104 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -60,8 +60,10 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), {
|
||||
getGridBounds:function() {
|
||||
var topLeftTile = this.grid[0][0];
|
||||
var bottomRightTile = this.grid[this.grid.length-1][this.grid[0].length-1];
|
||||
return new OpenLayers.Bounds(bottomRightTile.bounds.minlat, topLeftTile.bounds.minlon,
|
||||
topLeftTile.bounds.maxlat, bottomRightTile.bounds.maxlon);
|
||||
return new OpenLayers.Bounds(topLeftTile.bounds.minlon,
|
||||
bottomRightTile.bounds.minlat,
|
||||
bottomRightTile.bounds.maxlon,
|
||||
topLeftTile.bounds.maxlat);
|
||||
},
|
||||
_initTiles:function() {
|
||||
var viewSize = this.map.getSize();
|
||||
@@ -98,17 +100,15 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), {
|
||||
tileoffsetlon = startLon;
|
||||
tileoffsetx = startX;
|
||||
do {
|
||||
var tileBounds = new OpenLayers.Bounds(
|
||||
tileoffsetlat,
|
||||
tileoffsetlon,
|
||||
tileoffsetlat+tilelat,
|
||||
tileoffsetlon+tilelon
|
||||
);
|
||||
var tileBounds = new OpenLayers.Bounds(tileoffsetlon,
|
||||
tileoffsetlat,
|
||||
tileoffsetlon+tilelon,
|
||||
tileoffsetlat+tilelat);
|
||||
|
||||
var tile = this.addTile(tileBounds,
|
||||
new OpenLayers.Pixel(tileoffsetx,
|
||||
tileoffsety
|
||||
)
|
||||
);
|
||||
tileoffsety)
|
||||
);
|
||||
row.append(tile);
|
||||
|
||||
tileoffsetlon += tilelon;
|
||||
|
||||
Reference in New Issue
Block a user