react-native-maps-directions icon indicating copy to clipboard operation
react-native-maps-directions copied to clipboard

Call Directions Api only if new location is not in already made polyline.

Open PROda221 opened this issue 2 years ago • 2 comments

Hello developers! Thank you for this great library! Great work <3 I needed to know if this is possible or in the scope of this library or not:-

  1. If the new location is in the array of fetched directions, then update only the polyline between origin and destination avoiding a new directions api call. This means, the line will reduce without fetching new data from directions api.
  2. If the new direction received is not in the array itself (that means driver changed route maybe), then call the api to get new directions and draw polyline accordingly.

I wanted to know if this is already handled by this library. If not, can it be considered for addition in the next update? If it is out of scope, can anyone help how to use this library to achieve the same (if possible?)

Also if this approach is not good to reduce api calls then can anyone suggest any alternatives?

Thanks!

PROda221 avatar Sep 15 '22 09:09 PROda221

Hello? Anyone here to help?

PROda221 avatar Sep 16 '22 09:09 PROda221

same issue here! api usage is very high!

murilo8812 avatar May 10 '23 01:05 murilo8812