[OpenLayers-Dev] Re: map div has 0 height, width when loading in non-active tab

crb jcbeaude at yahoo.com
Tue Oct 19 18:43:58 EDT 2010


Thanks for the quick reply Gregers.

We've considered doing something similar (and may have to eventually) but
currently the users can nav from the Search/map tab while it is still
loading (whether by selecting the other tab or clicking the Search button in
the map tab) and between the time the map load starts and the time it needs
the div width/height, the width/height could still be 0, causing the map
init to fail.  Browser refreshes from other tabs could also cause problems.

I guess all scenarios could be handled by:
- initializing the map the first time the map tab is visible  (as you did)
- disabling all controls on the map tab until the map is fully initialized 
(I'm assuming you did this as well)


-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/map-div-has-0-height-width-when-loading-in-non-active-tab-tp5651744p5652959.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.


More information about the Dev mailing list