title: google maps kml layer refresh problem
body: <p>I have a kml layer on my google maps app. I tried to refresh the kml layer by generating a new google.maps.KmlLayer object every 10s. The kml file contains customized icons. It works fine for the first several times of refreshing. However after a few minutes, the kml layer disappears (the icons disappear but they are still clickable). Any ideas why the kml layer disappears?</p>
  
  <p>Here is the snippet of my code:</p>
  
  <pre><code>function initialize() {
          var p = new google.maps.LatLng(36.668419,-119.267578);
          var mapOptions = {
            zoom: 5,
            center: p,
            mapTypeId: google.maps.MapTypeId.ROADMAP
          };
          map = new google.maps.Map(document.getElementById("map_canvas"),
              mapOptions);
  
          var kmllayer = new google.maps.KmlLayer('http://api.flickr.com/services/feeds/geo/?g=322338@N20&amp;lang=en-us&amp;format=feed-georss'
            + '?key='
            + Math.random(),
            ({'preserveViewport': true}));
          geotaggingLayer.setMap(map);
  
          setInterval(refresh, 10000, kmllayer);
        }
  
        function refresh(layer) {
  
            var newkmllayer = new google.maps.KmlLayer('http://api.flickr.com/services/feeds/geo/?g=322338@N20&amp;lang=en-us&amp;format=feed-georss'
              + '?key='
              + Math.random(),
              ({'preserveViewport': true}));
            layer.setMap(null);
            newkmllayer.setMap(map);
        }
  </code></pre>
  
  <p>Thank you.</p>