I’m using the javascript API for Google Maps. It’s pretty simple, I just have:
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
function initialize() {
var myLatlng = new google.maps.LatLng(<?php echo $get_music_spot['music_spot_lat'].', '.$get_music_spot['music_spot_lng']; ?>);
var myOptions = {
zoom: 14,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
var marker = new google.maps.Marker({
position: myLatlng,
map: map,
title:"<?php echo $get_music_spot['music_spot_title']; ?>"
});
}
</script>
in the header, then I have <div style="width:600px; height:500px; float:left;" id="map_canvas"></div>
in the body to actually call the map. Then of course I have <body onLoad="initialize()">
This is basically all you need for a basic map. But, because it’s inside jQuery e.g. jQuery UI tabs it goes haywire. Here’s a screenshot:

You can see that only a fragment of the map is shown in the upper left hand corner. Why would this happen and how could I fix this? I implemented the iFrame as a basic embed, but that doesn’t work in IE.
As for why it’s not working, I couldn’t tell you why. But try using one of the events on the jQuery Tabs widget to initialise the map, such as the
showorselectevent.It’s important to include a check in there so that the map isn’t reloaded every time the map tab (or any other tab) is selected.
See it working at this jsFiddle.