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:
euzuro
2006-05-17 16:50:12 +00:00
parent fe360c91e5
commit ff2e3017f9
6 changed files with 69 additions and 42 deletions

View File

@@ -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;