[OpenLayers-Users] IE problems with OL + dojo

William Kyngesburye woklist at kyngchaos.com
Tue Mar 31 12:49:24 EDT 2009


I've made a little progress, if it can be called that.  First, the  
order of the setup before was:

load dojo.js (base)
load openlayers.js
dojo.addOnLoad(
load dojo modules (dojo uses 'require' dynamic loading mechanism)
setup openlayers map object
setup and parse dojo layout
zoom map

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


I wonder if maybe there are now some problems with loading dojo  
modules after OL.

I tried loading OL from dojo.require(), after putting the OL files  
alongside dojo, but OL couldn't find it's images and css (in all  
browsers) - OL is looking relative to the map JS, not itself.  And IE6  
started having object errors.  Maybe a customized OL is needed that  
will work as a dojo module, hmm...

On Mar 28, 2009, at 10:17 AM, William Kyngesburye wrote:

> On Mar 28, 2009, at 2:54 AM, Eric Lemoine wrote:
>
>> Hi.
>>
>> The "missing tiles" syndrom is often due to setCenter executed too
>> early, i.e. before the map div has its final dimensions.
>>
> I'm calling zoomToMaxExtent at the very end of the initialization
> (dojo.addOnLoad for Dojo).  Is this something that is more likely to
> affect IE?

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

"Oh, look, I seem to have fallen down a deep, dark hole.  Now what  
does that remind me of?  Ah, yes - life."

- Marvin





More information about the Users mailing list