priyankapakhale / GoogleMaps-Directions

22 stars 31 forks source link

Polyline Clear #1

Open khalilurrehman28 opened 6 years ago

khalilurrehman28 commented 6 years ago

polylines are not clear if new destination point is set

humayuntanwar commented 6 years ago

did you find any solution for this?

khalilurrehman28 commented 6 years ago

you can use map.clear() to clear out all the data on the screen on google map

humayuntanwar commented 6 years ago

but that would clear all the markers as well, that is not efficient

kashifansari786 commented 6 years ago

if (polylines.size() > 0) { for (Polyline poly : polylines) { poly.remove(); } }