title: Google maps js api v3: grey map in chrome
body: <p>Im having some problems with a street view map: <a href="http://server.patrikelfstrom.se/johan/fysiosteo/?page_id=118" rel="nofollow">http://server.patrikelfstrom.se/johan/fysiosteo/?page_id=118</a></p>
  
  <p>Sometimes the window gets grey instead of showing the streetview. So my question is; Is there any way to know when the map has finished loading? I guess its treying to render the map before its completly loaded? Thanks</p>
  
  <pre><code> function initialize() {
  
        var myLatlng = new google.maps.LatLng(57.6988062, 11.9683293);
        var myOptions = {
          zoom: 16,
          center: myLatlng,
          mapTypeId: google.maps.MapTypeId.ROADMAP,
          disableDefaultUI: true
        }
        var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
  
         var marker = new google.maps.Marker({
            position: myLatlng, 
            map: map, 
            animation: google.maps.Animation.DROP,
            title:"Fysiosteo"
        });   
  
        var panoramaOptions = {
            position: myLatlng,
            addressControl: false, 
             pov: {
              heading: 90,
              pitch: 0,
              zoom: 0
            } 
          };
  
          var panorama = new  google.maps.StreetViewPanorama(document.getElementById("pano"),panoramaOptions);
          map.setStreetView(panorama);  
  
  
  
          google.maps.event.addListener(panorama, 'idle', function() { console.log('done'); });
  
      }
  
      function loadScript() {
        var script = document.createElement("script");
        script.type = "text/javascript";
        script.src = "http://maps.googleapis.com/maps/api/js?sensor=false&amp;callback=initialize";
        document.body.appendChild(script);
  
  
      }
  
      window.onload = loadScript;
  </code></pre>
  
  <p>I tried with this code to print "done" to the console when the map has finished loading, but it didnt work. Am i doing it wrong? :)</p>