Changing extent structure back to single array: [minX, minY, maxX, maxY]

This means we'll have to have a new structure and new methods for 3D envelopes.
This commit is contained in:
Tim Schaub
2013-09-15 00:15:24 -06:00
parent de0e8aeced
commit e806f51b3d
63 changed files with 379 additions and 392 deletions
+4 -4
View File
@@ -232,11 +232,11 @@ ol.tilegrid.TileGrid.prototype.getTileRangeForExtentAndResolution =
function(extent, resolution, opt_tileRange) {
var tileCoord = ol.tilegrid.TileGrid.tmpTileCoord_;
this.getTileCoordForXYAndResolution_(
extent[0][0], extent[0][1], resolution, false, tileCoord);
extent[0], extent[1], resolution, false, tileCoord);
var minX = tileCoord.x;
var minY = tileCoord.y;
this.getTileCoordForXYAndResolution_(
extent[1][0], extent[1][1], resolution, true, tileCoord);
extent[2], extent[3], resolution, true, tileCoord);
return ol.TileRange.createOrUpdate(
minX, tileCoord.x, minY, tileCoord.y, opt_tileRange);
};
@@ -414,8 +414,8 @@ ol.tilegrid.createForProjection =
var size = goog.isNull(projectionExtent) ?
360 * ol.METERS_PER_UNIT[ol.ProjectionUnits.DEGREES] /
projection.getMetersPerUnit() :
Math.max(projectionExtent[1][0] - projectionExtent[0][0],
projectionExtent[1][1] - projectionExtent[0][1]);
Math.max(projectionExtent[2] - projectionExtent[0],
projectionExtent[3] - projectionExtent[1]);
var maxZoom = goog.isDef(opt_maxZoom) ?
opt_maxZoom : ol.DEFAULT_MAX_ZOOM;
var tileSize = goog.isDef(opt_tileSize) ?