The map was displaying properly before the addition of the panel
. Now as soon as I add a panel div
on the page the map displays just like this:
It is just cluttered on the top portion leaving a wide space below. The button on the top left corner of the image is used to open the panel which opens fine. Sorry for the patchy image work.
The html is below:
<body>
<div data-role="page" id="map-page" data-url="map-page">
<div data-role="panel" id="mypanel">
<!-- This is the problematic panel-->
</div><!-- /panel -->
<div data-role="header">
<a href="#mypanel" data-role="button" data-icon="bars" data-iconpos="notext">Choose Station</a>
<h1>The Header</h1>
<a href="index.html" data-ajax="false" data-role="button" data-icon="refresh" data-iconpos="notext">Refresh</a>
</div><!-- /header -->
<div data-role="content" id="map-canvas"> <!--Div for map display.-->
</div><!-- /content -->
<div data-role="footer" data-id="myfooter" class="ui-bar" data-position="fixed">
<h4>© 2013</h4>
</div><!-- /footer -->
</div><!-- /page -->
</body>
My custom css
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map-page, #map-canvas { height: 100% }
Otherwise I am using default jquery.mobile-1.3.1.min.css
. I probably know it might well be because of css, but could not figure out.