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 <exclamation>.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@955 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -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;
|
||||
},
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user