tonylife

Map is alway created with default size 400*400

Discussion created by tonylife on May 29, 2013
Latest reply on May 30, 2013 by schlot
Hi

When I create map using follow code, the map is always forced to be 400*400.
I tried to debug the javascript a little bit, before create map, the div has the right size 500*360, after create map, the div becomes 400*400, even I force the size in both html and javascript.
The map is created within a modal popup window using twitter bootstrap.

Please help on this.

Thanks,
Tony


[HTML]        <div style="height: 360px; overflow: auto;">
            <div style="float: left; margin-right: 5px">
                <table id="quickSearchGrid" style="vertical-align: baseline">
                </table>
                <div id="quickSearchPager">
                </div>
            </div>
            <div>
                <div id="mymap" style="width: 500px; height: 360px;"></div>
            </div>
        </div>[/HTML]

                var map = new esri.Map("mymap", {
                    basemap: "topo", 
                    slider: true,
                    height: 360,
                    width: 500,
                    zoom: 2, 
                });

Outcomes