Don't ever return NaN from getLayerContainerPxFromViewPortPx, since that

can cause problems in multiple different layers -- instead, just return 
null, which is handled more gracefully.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1219 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-08-15 16:11:58 +00:00
parent cbde344ad0
commit ae02671983

View File

@@ -1008,7 +1008,10 @@ OpenLayers.Map.prototype = {
var dY = -parseInt(this.layerContainerDiv.style.top);
layerPx = viewPortPx.add(dX, dY);
}
return layerPx;
if (!isNaN(layerPx.x) && !isNaN(layerPx.y)) {
return layerPx;
}
return null;
},
//