<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Alright Chris,<br><br>I'll give that try.<br><br>S.D.<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Christopher Schmidt <crschmidt@metacarta.com><br>To: samd <sdoyle_2@yahoo.com><br>Cc: users@openlayers.org<br>Sent: Tuesday, September 18, 2007 1:50:07 PM<br>Subject: Re: [OpenLayers-Users] Fixing Google Layers, OL SVN + OL <= 2.4<br><br><div>On Tue, Sep 18, 2007 at 01:46:24PM -0700, samd wrote:<br>> <br>> Yes Chris,<br>> <br>> I added the change you mentioned to the start of my onload routine before<br>> the map/layers are created but the JavaScripts are loaded.<br><br>Sam:<br><br>I'm sorry. The previous code
provided was mistaken. The Wiki Page is now<br>updated to code which will work. Instead of the previous snippet, you<br>should do:<br><br>OpenLayers.Layer.Google.prototype.addContainerPxFunction=function() {<br> if (typeof GMap2 != "undefined" && !GMap2.fromLatLngToContainerPixel) {<br> <br> GMap2.prototype.fromLatLngToContainerPixel = function(gLatLng) {<br> <br> // first we translate into "DivPixel"<br> var gPoint = this.fromLatLngToDivPixel(gLatLng);<br> <br> // locate the sliding "Div"
div<br> var div = this.getContainer().firstChild.firstChild;<br> <br> // adjust by the offset of "Div" and voila!<br> gPoint.x += div.offsetLeft;<br> gPoint.y += div.offsetTop;<br> <br> return gPoint;<br> }; <br> } <br>}; <br><br><br>Please let us know if this does not fix the problem.<br><br>Regards,<br>-- <br>Christopher
Schmidt<br>MetaCarta<br></div></div><br></div></div></body></html>