Do not sort resolutions array
We assert that the resolutions array is sorted instead of sorting it ourselves. This is to consistent with ol.TileGrid.
This commit is contained in:
@@ -61,9 +61,11 @@ ol.source.ImageSource = function(options) {
|
|||||||
*/
|
*/
|
||||||
this.resolutions_ = goog.isDef(options.resolutions) ?
|
this.resolutions_ = goog.isDef(options.resolutions) ?
|
||||||
options.resolutions : null;
|
options.resolutions : null;
|
||||||
if (!goog.isNull(this.resolutions_)) {
|
goog.asserts.assert(goog.isNull(this.resolutions_) ||
|
||||||
goog.array.sort(this.resolutions_, function(a, b) {return b - a; });
|
goog.array.isSorted(this.resolutions_,
|
||||||
}
|
function(a, b) {
|
||||||
|
return b - a;
|
||||||
|
}, true));
|
||||||
|
|
||||||
};
|
};
|
||||||
goog.inherits(ol.source.ImageSource, ol.source.Source);
|
goog.inherits(ol.source.ImageSource, ol.source.Source);
|
||||||
|
|||||||
Reference in New Issue
Block a user