diff --git a/src/viewport.js b/src/viewport.js index 691851c4..5c4c9f2d 100644 --- a/src/viewport.js +++ b/src/viewport.js @@ -551,7 +551,9 @@ $.Viewport.prototype = { */ zoomTo: function( zoom, refPoint, immediately ) { - this.zoomPoint = refPoint instanceof $.Point ? + this.zoomPoint = refPoint instanceof $.Point && + !isNaN(refPoint.x) && + !isNaN(refPoint.y) ? refPoint : null;