diff --git a/lib/OpenLayers/Control/OverviewMap.js b/lib/OpenLayers/Control/OverviewMap.js index cb5301125b..b3fb971c60 100644 --- a/lib/OpenLayers/Control/OverviewMap.js +++ b/lib/OpenLayers/Control/OverviewMap.js @@ -520,8 +520,8 @@ OpenLayers.Control.OverviewMap.prototype = this.ovmap.size.w - this.wComp); this.extentRectangle.style.top = parseInt(top) + 'px'; this.extentRectangle.style.left = parseInt(left) + 'px'; - this.extentRectangle.style.height = parseInt(bottom - top)+ 'px'; - this.extentRectangle.style.width = parseInt(right - left) + 'px'; + this.extentRectangle.style.height = parseInt(Math.max(bottom - top, 0))+ 'px'; + this.extentRectangle.style.width = parseInt(Math.max(right - left, 0)) + 'px'; }, /**