title: How to remove polylines in Google Maps Android API v2?
body: <p>So basically I have two markers: one is for the destination (which is just static meaning it does not move) and the other marker is dynamic and updates its position based on the current location. </p>
  
  <p>I was able to draw a polyline on a route between the two markers. The only problem is when updating the current location, the previous polyline which was drawn from the previous position of the dynamic marker is still there.</p>
  
  <p>Here is the image:</p>
  
  <p><img src="https://i.stack.imgur.com/f3iHm.png" alt="enter image description here">)</p>
  
  <p>As you can see in the image, the marker is the dynamic one which points to the current location and the polyline from the marker's previous position is located at the University of San Carlos just at the upper-right position of the marker in the image. The destination marker is not shown in this image.</p>
  
  <p>How do I remove the previous polyline? I tried using the method remove() from the Polyline class but it didn't work.</p>
  
  <p>I based my code from this link:
  <a href="https://stackoverflow.com/questions/14702621/answer-draw-path-between-two-points-using-google-maps-android-api-v2">Answer : Draw path between two points using Google Maps Android API v2</a></p>