From fca63a4ffec3b660db887ef02320aa9be82d5d79 Mon Sep 17 00:00:00 2001 From: euzuro Date: Sun, 16 Jul 2006 18:49:39 +0000 Subject: [PATCH] two changes I had to scour the net to find. First off, PixelToLatLong() does not take the arguments that the official SDK tell us it does. Thanks to Denis of ViaVirtualEarth.com for the workaround. Next, the olPix-vePix conversion, the actual mysterious undocumented 'Pixel' class appears to be Msn.VE.Pixel -- thanks to blogs.msdn.com/virtualearth for that one. if only things were a little more *open* we wouldnt have to hunt for things like this . git-svn-id: http://svn.openlayers.org/trunk/openlayers@955 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer/VirtualEarth.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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; }, //