Select to view content in your preferred language

Map not resizing

999
3
Jump to solution
02-25-2013 08:48 AM
FaizanTayyab
Deactivated User
HI All,

I have my map placed within a div

<div id="mapContainer">    <div id="mapDiv" dojotype="dijit.layout.ContentPane" region="center" style="height:100%; width:100%"></div> </div>


The mapContainer is itself within a jQuery ui tab widget.

The map re sizes itself when browser size is changed without any extra code in FF however in IE8, the map does not resize itself.

I have tried various suggestions including one from the guidelines but nothing seems to work. Any ideas?

dojo.connect(dojo.byId('mapDiv'), 'resize', function(extent) {        map.resize(); });

Moving the map div under the body tag and not within any widget or any other tags fixes the issue, but i do want to use the tab widget.

Thanks
0 Kudos
1 Solution

Accepted Solutions
FaizanTayyab
Deactivated User
It worked in IE8 after including the compatibility meta tag.

View solution in original post

0 Kudos
3 Replies
HemingZhu
Frequent Contributor
HI All,

I have my map placed within a div

<div id="mapContainer">
   <div id="mapDiv" dojotype="dijit.layout.ContentPane" region="center" style="height:100%; width:100%"></div>
</div>


The mapContainer is itself within a jQuery ui tab widget.

The map re sizes itself when browser size is changed without any extra code in FF however in IE8, the map does not resize itself.

I have tried various suggestions including one from the guidelines but nothing seems to work. Any ideas?

dojo.connect(dojo.byId('mapDiv'), 'resize', function(extent) { 
      map.resize();
});

Moving the map div under the body tag and not within any widget or any other tags fixes the issue, but i do want to use the tab widget.

Thanks


Have you tried to use jQuery's bind method to raise the map control's resize event?
0 Kudos
SamirGambhir
Frequent Contributor
Have you tried to use jQuery's bind method to raise the map control's resize event?


IE8 is very picky in parsing JavaScript code. Try using IE9. If it works in IE9 then you are sure it is not your code but this buggy, useless browser.
0 Kudos
FaizanTayyab
Deactivated User
It worked in IE8 after including the compatibility meta tag.
0 Kudos