Use Infinity instead of Number.POSITIVE_INFINITY
This commit is contained in:
@@ -40,9 +40,9 @@ goog.inherits(ol.geom.AbstractCollection, ol.geom.Geometry);
|
|||||||
ol.geom.AbstractCollection.prototype.getBounds = function() {
|
ol.geom.AbstractCollection.prototype.getBounds = function() {
|
||||||
if (goog.isNull(this.bounds)) {
|
if (goog.isNull(this.bounds)) {
|
||||||
var minX,
|
var minX,
|
||||||
minY = minX = Number.POSITIVE_INFINITY,
|
minY = minX = Infinity,
|
||||||
maxX,
|
maxX,
|
||||||
maxY = maxX = Number.NEGATIVE_INFINITY,
|
maxY = maxX = -Infinity,
|
||||||
components = this.components,
|
components = this.components,
|
||||||
len = components.length,
|
len = components.length,
|
||||||
bounds, i;
|
bounds, i;
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ ol.parser.ogc.WMSCapabilities_v1_1 = function() {
|
|||||||
if (min !== 0) {
|
if (min !== 0) {
|
||||||
obj['maxScale'] = parseFloat((min / rad2) * ipm * dpi);
|
obj['maxScale'] = parseFloat((min / rad2) * ipm * dpi);
|
||||||
}
|
}
|
||||||
if (max != Number.POSITIVE_INFINITY) {
|
if (max != Infinity) {
|
||||||
obj['minScale'] = parseFloat((max / rad2) * ipm * dpi);
|
obj['minScale'] = parseFloat((max / rad2) * ipm * dpi);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -152,8 +152,7 @@ ol.structs.RTree = function() {
|
|||||||
* @type {ol.structs.RTreeNode_}
|
* @type {ol.structs.RTreeNode_}
|
||||||
*/
|
*/
|
||||||
this.root_ = new ol.structs.RTreeNode_(
|
this.root_ = new ol.structs.RTreeNode_(
|
||||||
Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY,
|
-Infinity, -Infinity, Infinity, Infinity, null, 0);
|
||||||
Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, null, 0);
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user