[OpenLayers-Users] Fixing Google Layers, OL SVN + OL <= 2.4

samd sdoyle_2 at yahoo.com
Tue Sep 18 16:49:37 EDT 2007


Oh and one more thing it is only IE friendly at the moment.

S.D.


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.
> 
> S.D.
> 
> 
> You can see on our demo box:
> http://64.237.5.34/ilda/
> 
> This version doesn't include the fix but I have applied the fix you have
> mentioned on my development box and the exact same error still occurs.
> 
> My onLoad function starts like this:
> 
> function initILDA() 
> {
>    // Google Layer Patch                            
>    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;
>    };  
> 
> 
> 
> Christopher Schmidt-4 wrote:
>> 
>> On Tue, Sep 18, 2007 at 01:37:21PM -0700, samd wrote:
>>> this.b.firstChild is null or not an object
>>> 
>>> The same code works fine with GeoServer WMS
>> 
>> SD -- 
>> 
>> We've already identified the problem, and the solution, as described in
>> the code. Are you saying that the fix does not work for you? Can you
>> share an example?
>> 
>> Regards,
>> -- 
>> Christopher Schmidt
>> MetaCarta
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Fixing-Google-Layers%2C-OL-SVN-%2B-OL-%3C%3D-2.4-tf4476705.html#a12765791
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list