Hi, I quickly realized this:
function initialize() { var mapOptions = { center: new google.maps.LatLng(42.365885, -71.258658), zoom: 16, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions); google.maps.event.trigger(map,'resize'); } $(document).on("pageshow", "#map", function () { initialize(); });
with a page div called "map" and a div div called "map-canvas".
This seems to be like initializing a map when a page is displayed. This makes your application slower loading the map when the user opens it, but this avoids the errors caused by dom and whatnot. This completely fixes the problem with corner maps / gray areas on my phone + jquery mobile + app for Google Maps!
user2183893
source share