title: Remove marker in Google Maps Api v3
body: <p>I'm using this function to add a new marker (and polyline) to a map:</p>
  
  <pre><code> function addMarker(location) {
  
      path = poly.getPath();
      path.push(location);
      marker = new google.maps.Marker({
          position: location,
          icon:'location.png',
          title: poly.inKm() + ' km',
          map: map
      });
      markersArray.push(marker);
  }
  </code></pre>
  
  <p>How can I remove the last marker (for implementing undo)?</p>
  
  <p>Best regards ...</p>