The problems boil down to NOT having the div visible that the map will display into when google maps is initialized.
Solutions:
- Off-left technique
.ui-tabs .ui-tabs-hide { position: absolute; left: -10000px; }
- Resize the map when idle
- The below can also be combined with a setTimeout, which I had to use to get it to work when deployed to a phone browser. HACK I know
google.maps.event.addListenerOnce(map, 'idle', function() { google.maps.event.trigger(map, 'resize'); map.setCenter(point); // be sure to reset the map center as well });
- Asynchronously Loading the API
http://stackoverflow.com/questions/1428178/problems-with-google-maps-api-v3-jquery-ui-tabs
No comments:
Post a Comment