diff --git a/lib/OpenLayers/Layer/VirtualEarth.js b/lib/OpenLayers/Layer/VirtualEarth.js index 95c2ad1191..d2cef19a1b 100644 --- a/lib/OpenLayers/Layer/VirtualEarth.js +++ b/lib/OpenLayers/Layer/VirtualEarth.js @@ -187,7 +187,8 @@ OpenLayers.Layer.VirtualEarth.prototype = var lonlat = null; if (this.vemap != null) { var pixel = this.getPixelFromOLPixel(viewPortPx); - var veLatLong = this.vemap.PixelToLatLong(pixel) + var zoom = this.vemap.GetZoomLevel(); + var veLatLong = this.vemap.PixelToLatLong(pixel.x, pixel.y, zoom); lonlat = this.getOLLonLatFromVELatLong(veLatLong); } return lonlat; @@ -342,7 +343,11 @@ OpenLayers.Layer.VirtualEarth.prototype = * @type Pixel */ getPixelFromOLPixel: function(olPixel) { - return olPixel; + var pixel = null; + if (olPixel != null) { + pixel = new Msn.VE.Pixel(olPixel.x, olPixel.y); + } + return pixel; }, //