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:
@@ -20,7 +20,7 @@ ol.source.ImageStatic = function(options) {
|
||||
|
||||
var imageExtent = options.imageExtent;
|
||||
var imageSize = options.imageSize;
|
||||
var imageResolution = (imageExtent[1][1] - imageExtent[0][1]) / imageSize[1];
|
||||
var imageResolution = (imageExtent[3] - imageExtent[1]) / imageSize[1];
|
||||
var projection = ol.proj.get(options.projection);
|
||||
|
||||
goog.base(this, {
|
||||
|
||||
@@ -89,8 +89,8 @@ ol.source.ImageWMS.prototype.getImage =
|
||||
|
||||
extent = extent.slice();
|
||||
ol.extent.scaleFromCenter(extent, this.ratio_);
|
||||
var width = (extent[1][0] - extent[0][0]) / resolution;
|
||||
var height = (extent[1][1] - extent[0][1]) / resolution;
|
||||
var width = (extent[2] - extent[0]) / resolution;
|
||||
var height = (extent[3] - extent[1]) / resolution;
|
||||
var size = [width, height];
|
||||
|
||||
this.image_ = this.createImage(extent, resolution, size, projection);
|
||||
|
||||
@@ -75,11 +75,11 @@ ol.source.TileWMS = function(options) {
|
||||
extent = goog.isDef(extent) ? extent : projectionExtent;
|
||||
|
||||
if (!goog.isNull(extent) && projection.isGlobal() &&
|
||||
extent[0][0] === projectionExtent[0][0] &&
|
||||
extent[1][0] === projectionExtent[1][0]) {
|
||||
extent[0] === projectionExtent[0] &&
|
||||
extent[2] === projectionExtent[2]) {
|
||||
var numCols = Math.ceil(
|
||||
(extent[1][0] - extent[0][0]) /
|
||||
(tileExtent[1][0] - tileExtent[0][0]));
|
||||
(extent[2] - extent[0]) /
|
||||
(tileExtent[2] - tileExtent[0]));
|
||||
x = goog.math.modulo(x, numCols);
|
||||
tileExtent = tileGrid.getTileCoordExtent(
|
||||
new ol.TileCoord(tileCoord.z, x, tileCoord.y));
|
||||
|
||||
@@ -54,8 +54,8 @@ ol.source.wms.getUrl =
|
||||
|
||||
var axisOrientation = projection.getAxisOrientation();
|
||||
var bboxValues = (wms13 && axisOrientation.substr(0, 2) == 'ne') ?
|
||||
[extent[0][1], extent[0][0], extent[1][1], extent[1][0]] :
|
||||
[extent[0][0], extent[0][1], extent[1][0], extent[1][1]];
|
||||
[extent[1], extent[0], extent[3], extent[2]] :
|
||||
[extent[0], extent[1], extent[2], extent[3]];
|
||||
baseParams['BBOX'] = bboxValues.join(',');
|
||||
|
||||
return goog.uri.utils.appendParamsFromMap(baseUrl, baseParams);
|
||||
|
||||
@@ -154,11 +154,11 @@ ol.source.WMTS = function(options) {
|
||||
options.extent : projectionExtent;
|
||||
|
||||
if (!goog.isNull(extent) && projection.isGlobal() &&
|
||||
extent[0][0] === projectionExtent[0][0] &&
|
||||
extent[1][0] === projectionExtent[1][0]) {
|
||||
extent[0] === projectionExtent[0] &&
|
||||
extent[2] === projectionExtent[2]) {
|
||||
var numCols = Math.ceil(
|
||||
(extent[1][0] - extent[0][0]) /
|
||||
(tileExtent[1][0] - tileExtent[0][0]));
|
||||
(extent[2] - extent[0]) /
|
||||
(tileExtent[2] - tileExtent[0]));
|
||||
x = goog.math.modulo(x, numCols);
|
||||
tmpTileCoord.z = tileCoord.z;
|
||||
tmpTileCoord.x = x;
|
||||
|
||||
Reference in New Issue
Block a user