A user on the jQuery Mobile forum suggested the following:
var changeViewport = function () {
if (window.orientation == 90 || window.orientation == 270)
$('meta[name="viewport"]').attr('content', 'height=device-width,width=device-height,initial-scale=1.0,maximum-scale=1.0');
else
$('meta[name="viewport"]').attr('content', 'height=device-height,width=device-width,initial-scale=1.0,maximum-scale=1.0');
}
window.addEventListener('orientationchange', changeViewport, true);
try { changeViewport(); } catch (err) { }
I tried this with moderate success, at least it's the best solution I've seen so far to this problem. But it only seems to work if I execute a task first against the map. For example, I have to execute a task in my app that will find a feature and zoom to it on the map. Then when I rotate my iOS device to landscape the map will fill the entire screen but my toolbars at the top of the map are hidden. I have to tap the iOS bar at the top of the screen (that shows the time and the wifi connection strength) and then I can see my toolbar at the top of the app. Of course, the browser's url bar also appears, but you can tap and hold the toolbar and scroll up until the url bar disappears. The good news is that the app didn't scale too large like in my previous attempts. And now when I rotate back to portrait the app displays normally and the map fills the entire screen as expected. So this code is at least a step in the right direction. Hopefully this will give you something to go on for a workaround until Apple fixes the bug.