Merge pull request #4884 from fredj/isFinite
Remove use of goog.math.isFiniteNumber()
This commit is contained in:
@@ -2,7 +2,6 @@ goog.provide('ol.reproj');
|
|||||||
|
|
||||||
goog.require('goog.labs.userAgent.browser');
|
goog.require('goog.labs.userAgent.browser');
|
||||||
goog.require('goog.labs.userAgent.platform');
|
goog.require('goog.labs.userAgent.platform');
|
||||||
goog.require('goog.math');
|
|
||||||
goog.require('ol.dom');
|
goog.require('ol.dom');
|
||||||
goog.require('ol.extent');
|
goog.require('ol.extent');
|
||||||
goog.require('ol.math');
|
goog.require('ol.math');
|
||||||
@@ -61,7 +60,7 @@ ol.reproj.calculateSourceResolution = function(sourceProj, targetProj,
|
|||||||
sourceProj.getPointResolution(sourceResolution, sourceCenter) /
|
sourceProj.getPointResolution(sourceResolution, sourceCenter) /
|
||||||
sourceResolution;
|
sourceResolution;
|
||||||
|
|
||||||
if (goog.math.isFiniteNumber(compensationFactor) && compensationFactor > 0) {
|
if (isFinite(compensationFactor) && compensationFactor > 0) {
|
||||||
sourceResolution /= compensationFactor;
|
sourceResolution /= compensationFactor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ goog.provide('ol.reproj.Tile');
|
|||||||
goog.provide('ol.reproj.TileFunctionType');
|
goog.provide('ol.reproj.TileFunctionType');
|
||||||
|
|
||||||
goog.require('goog.asserts');
|
goog.require('goog.asserts');
|
||||||
goog.require('goog.math');
|
|
||||||
goog.require('ol.Tile');
|
goog.require('ol.Tile');
|
||||||
goog.require('ol.TileState');
|
goog.require('ol.TileState');
|
||||||
goog.require('ol.events');
|
goog.require('ol.events');
|
||||||
@@ -145,7 +144,7 @@ ol.reproj.Tile = function(sourceProj, sourceTileGrid,
|
|||||||
var sourceResolution = ol.reproj.calculateSourceResolution(
|
var sourceResolution = ol.reproj.calculateSourceResolution(
|
||||||
sourceProj, targetProj, targetCenter, targetResolution);
|
sourceProj, targetProj, targetCenter, targetResolution);
|
||||||
|
|
||||||
if (!goog.math.isFiniteNumber(sourceResolution) || sourceResolution <= 0) {
|
if (!isFinite(sourceResolution) || sourceResolution <= 0) {
|
||||||
// invalid sourceResolution -> EMPTY
|
// invalid sourceResolution -> EMPTY
|
||||||
// probably edges of the projections when no extent is defined
|
// probably edges of the projections when no extent is defined
|
||||||
this.state = ol.TileState.EMPTY;
|
this.state = ol.TileState.EMPTY;
|
||||||
|
|||||||
Reference in New Issue
Block a user