title: Google Maps API V3 callbacks (KML loading)
body: <p>I'm using Google Maps API v3 to display a map a load some KML and display/hide them with <code>kml.setMap()</code> method.</p>
  
  <p>I need to display a "loading" window while the KML is loading until the map is complete loaded.</p>
  
  <p>I tried to use something like this:</p>
  
  <pre><code>google.maps.event.addListener(map, 'tilesloaded', function() {
      var d = new Date();
      console.log('Loaded: ' + d);
  });
  
  google.maps.event.addListener(map, 'bounds_changed', function() {
      var d = new Date();
      console.log('Started: ' + d);
  });
  </code></pre>
  
  <p>But it didn't worked as expected.</p>
  
  <p>The "titlesloaded" event is not fired always, probably because the cached images?</p>
  
  <p>Here is my log:</p>
  
  <pre><code>Started: Tue Mar 29 2011 16:22:03 GMT-0300 (BRT) &lt;-- started loading map
  Loaded: Tue Mar 29 2011 16:22:06 GMT-0300 (BRT) &lt;-- done loading map
  Started: Tue Mar 29 2011 16:22:30 GMT-0300 (BRT) &lt;-- started plotting the KML
  Started: Tue Mar 29 2011 16:22:30 GMT-0300 (BRT) &lt;-- started plotting the KML (again?!)
  Loaded: Tue Mar 29 2011 16:22:32 GMT-0300 (BRT) &lt;-- done plotting the KML
  </code></pre>
  
  <p>And received nothing while hiding/showing the KML again</p>