Search code examples
androidgoogle-maps-markersgoogle-maps-android-api-2google-polyline

Decrease polyline in google map when the marker moves towards destination(Android)


Please provide some idea,

I am trying to decrease the polyline in google map as the marker moves towards the destination.

I am hitting the google api for getting the poly line list frequently and redrawing the root.

I am searching for any best options...


Solution

  • under you onChangeLocation.

    after requesting for new location. clear the map then create a polyline from your current location to your destination. everytime you request for new location and you move towards your destination the polyline become shorter and shorter.