title: Reload Markers on Google's Maps API
body: <p>Here is my code(most code from Google's API page).</p>
  
  <pre><code>&lt;script&gt;
      var beaches = [
        ['Bondi Beach', -12.890542, 120.274856, 4],
        ['Coogee Beach', -12.923036, 520.259052, 5],
        ['Cronulla Beach', -12.028249, 1221.157507, 3],
        ['Manly Beach', -12.80010128657071, 1121.28747820854187, 2],
        ['Maroubra Beach', -33.950198, 121.259302, 1]
      ];
  
      function setMarkers(map, locations) {
        for (var i = 0; i &lt; locations.length; i++) {
          var beach = locations[i];
          var myLatLng = new google.maps.LatLng(beach[1], beach[2]);
          var marker = new google.maps.Marker({
              position: myLatLng,
              map: map,
              title: beach[0],
              zIndex: beach[3]
          });
        }
      }
  
      function initialize() {
        var mapOptions = {
          zoom: 3,
          center: new google.maps.LatLng(38.77417, -9.13417),
          mapTypeId: google.maps.MapTypeId.SATELLITE
        }
        var map = new google.maps.Map(document.getElementById('map-canvas'),
                                      mapOptions);
  
        setMarkers(map, beaches);
      }
  
      google.maps.event.addDomListener(window, 'load', initialize);
  
      setInterval(function() { setMarkers(map, beaches); }, 5000);
  
  &lt;/script&gt;
  </code></pre>
  
  <p>What I simply want to do is reload only the markers. I tried reloading the map using initialize function but it didn't work. Then I tried to reloading using setMarkers function and still no luck...</p>
  
  <p>Thanks for your help.</p>