[OpenLayers-Users] IE problems with OL + dojo

William Kyngesburye woklist at kyngchaos.com
Tue Mar 31 16:03:22 EDT 2009


On Mar 31, 2009, at 11:49 AM, William Kyngesburye wrote:

> I reordered this a bit to reverse the dojo and openlayers setup:
>
> load dojo.js (base)
> load openlayers.js
> dojo.addOnLoad(
> load dojo modules (dojo uses 'require' dynamic loading mechanism)
> setup and parse dojo layout
> setup openlayers map object
> zoom map
>
> Now in IE:
>
> - IE6 loads all the tiles on the first loading of the page - good
>
> - IE6 still has the errors on exiting the page - not so good
>
> - IE7 first time missed a tile, but a reload fixed it - not so good
>
> - after successive restarts of IE7, there are now random 'object
> expected' and '...is null or not an object' errors in the OL js, and
> the map does not load at all. - bad


Update: I've been using the multi-file OL in these attempts.  When I  
switched to the compressed single-file OL, IE7 no longer gives random  
object errors.  Looking at the OL code I see that OL loads the other  
js files by inserting script tags in the <head>.  This apparently  
doesn't work well with dojo's method of grabbing the js (for its  
modules) and evaluating it.  Or maybe it's slipping thru dojo's onload  
tests, so OL isn't fully loaded when dojo's onload is ready.

All that's left then (besides not being able to use the debug multi- 
file OL) is that both IE6 and IE7 still give the invalid argument  
error when exiting the page.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"History is an illusion caused by the passage of time, and time is an  
illusion caused by the passage of history."

- Hitchhiker's Guide to the Galaxy





More information about the Users mailing list