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