Issue Details (XML | Word | Printable)

Key: MAP-418
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Andreas Hocevar
Reporter: Andreas Hocevar
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Community Mapbuilder

Dynamically loaded OpenLayers map theme finishes too late - rendering issue in OverviewMap.js

Created: 05/Aug/07 02:27 AM   Updated: 05/Aug/07 02:42 AM
Component/s: mapbuilder-lib
Affects Version/s: trunk
Fix Version/s: 1.5alpha2

Time Tracking:
Not Specified


 Description  « Hide
OpenLayers loads the theme css defined in the map options of OpenLayers.Map when the OpenLayers library is loaded. In Mapbuilder, this happens when the map is created, after Mapbuilder init. So when the map gets rendered, the css might not be loaded yet. This makes the width/height compensation of the extent rectangle in the overview map fail, and so the rectangle may be larger than the overview map window.

This issue is now fixed by letting Mapbuilder take care of loading the theme. Because Mapbuilder does not draw widgets before the onload event of the html body, a dynamically loaded css specified before config init should be available when map rendering starts.

The new function loadCss in Util.js is now being used to load the OpenLayers css theme when the MapPaneOL function is initialized. This also closes a TBD from ButtonBase.js, because the same mechanism was used there to get the crucial styles for button rendering.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Andreas Hocevar added a comment - 05/Aug/07 02:29 AM
Described fixes applied with r3076