[OpenLayers-Dev] strange (blocking) behaviours of OL 2.10 with Firefox 5.0 (at least on Windows)

Peter Körner osm-lists at mazdermind.de
Wed Aug 10 09:34:05 EDT 2011

Am 10.08.2011 15:23, schrieb G. Allegri:
> Sorry fot having posted the wrong links, I forgot to edit them before
> sending.
> The problem is quite difficult to resume, because it affects various
> points of OL. In general, the Firebug console reports problems with
> various symbols and classes being undefined (e.g. OpenLayers.LonLat is
> not a constructor, OpenLayers.Format.GML.v3 is undefined,
> OpenLayers.Format.Filter is undefined, and so on). Try the Base Layers,
> or the Click Handler examples from
Yes I can confirm that and I'd guess it comes from the method used to 
delay-load the different files. It does a user-agent check here:

var docWrite = (agent.match("MSIE") || agent.match("Safari"));

if docWrite is true, it uses document.write("<script ... />") to load 
the scripts. If it is false, it uses 
document.getElementsByTagName("head")[0].appendChild(...) to load them.

as far I know, appendChild will load the files in the order the server 
responds, while document.write will wait for one file to load before the 
next gets loaded -- but this is only from my own and limited tests.

Loading the files in the wrong order produces the described problems.


More information about the Dev mailing list