GoogleDirectionLibrary icon indicating copy to clipboard operation
GoogleDirectionLibrary copied to clipboard

How to update polyline according to the user current location?

Open islamarr opened this issue 3 years ago • 5 comments

islamarr avatar Mar 21 '21 11:03 islamarr

Call this library with the new location then redraw the polyline on the map

akexorcist avatar Apr 05 '21 03:04 akexorcist

@akexorcist This approach will consume a lot of API requests which will cost more.

islamarr avatar Apr 05 '21 03:04 islamarr

@islamarr Absolutely yes. But no way to update the new route when user is outside the route direction with only single request from Direction API

akexorcist avatar Apr 05 '21 03:04 akexorcist

@akexorcist I think we can! by using polyline.setPoints(points); check this https://stackoverflow.com/a/17038499/7826372 But still I can't use it through this library.

islamarr avatar Apr 05 '21 03:04 islamarr

This library is great, but can I get the polyline created, so I can update just the polyLine. So that I can avoid calling the API request again

maxxy212 avatar Nov 29 '22 09:11 maxxy212