title: Google maps not loading within js tab
body: <p>I am trying to make tabs using js to have more data on the site.</p>
  
  <p>Please view: <a href="http://dev.ateo.dk/officelab-konferencecenter/" rel="nofollow">http://dev.ateo.dk/officelab-konferencecenter/</a></p>
  
  <p>The two tabs at the top ("Billeder" and "kort") are made using js.</p>
  
  <p>If i go into the tap called "kort", the google maps will not load completely - however if i right-click and choose "Inspect Element (Q)" using firefox,  the map suddenly loads.</p>
  
  <p>Also, the map is not centered. on the specific location - the location is in the top left corner. </p>
  
  <p>You may notice a blank square below the tab div. This is the exact same code as used within the js tab. If i comment out the  in js tab, the square which is blank, will work perfectly. So it somehow seems that the js tab combined with the js google maps are not working. Can this be the case, and if so, how is it fixed?</p>
  
  <p>Below i am showing the code which will init the google maps and the taps on the page:</p>
  
  <pre><code>if($('body.single-konferencested').length &gt; 0)
     {
         tabs();
     }
  
     if($('body.single-konferencested').length &gt; 0)
     {
        $(document).ready(function() {
           function initialize() {
              var myLatlng = new google.maps.LatLng(place_lat,place_lng);
              var mapOptions = {
                 zoom: 9,
                 center: myLatlng,
                 mapTypeId: google.maps.MapTypeId.ROADMAP
              }
              var map = new google.maps.Map(document.getElementById('gmap'), mapOptions);
  
              var marker = new google.maps.Marker({
                 position: myLatlng,
                 map: map,
                 clickable : true
              });
  
              var pinIcon = new google.maps.MarkerImage(
                 "http://dev.ateo.dk/wp-content/themes/ateo/img/pin_marker.png",
                 null, /* size is determined at runtime */
                 null, /* origin is 0,0 */
                 null, /* anchor is bottom center of the scaled image */
                 new google.maps.Size(24, 40)
              ); 
              marker.setIcon(pinIcon);
  
              var content_string = '&lt;div id="gmap_info"&gt;'+
                                      '&lt;div id="siteNotice"&gt;'+
                                      '&lt;/div&gt;'+
                                      '&lt;h3 id="firstHeading" class="firstHeading"&gt;'+place_title+'&lt;/h3&gt;'+
                                      '&lt;div id="bodyContent"&gt;'+
                                      '&lt;p&gt;'+place_address+'&lt;br /&gt;'+place_city_zip+'&lt;/div&gt;'+
                                   '&lt;/div&gt;';
  
              var infowindow = new google.maps.InfoWindow({
                 content: content_string
              });
  
              google.maps.event.addListener(marker, 'click', function() {
                 infowindow.open(map, marker);
              });
           }
  
           google.maps.event.addDomListener(window, 'load', initialize);
  
        });
     }
  </code></pre>
  
  <p>This following is the html showing the DOM for the "Kort" tab:</p>
  
  <pre><code>&lt;div class="tabContent" id="kort" style="padding: 5px 10px;"&gt;
  
      &lt;h2&gt;Kort&lt;/h2&gt;
      &lt;div id="gmap" style="width: 600px; height: 400px;"&gt;&lt;/div&gt;
      &lt;h2&gt;test&lt;/h2&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>Best regards
  Patrick</p>