Google maps problem with query mobile + phone gap

Posted on by Charalampos Chrysikopoulos

Implementing Google maps with phonegap using query mobile shouldn't be a problem. So I thought, at least at the beginning. The problems started at the very first run. The map didn't show as it should. Only some tiles of the map were shown, the rest was blank. You can see the problem described here.

Overcoming the problem is easy. Just initialize your map in the page on the "pagecreate" event.

$($your_page_element_here).live("pagecreate", function() {
initializeMap();
});
 
function initializeMap() {
        // initialize your map here
}
This entry was posted in javascript and tagged javascript, jquery mobile, mobile, phonegap by Charalampos Chrysikopoulos