bramus / bramus/react-native-maps-directions
Call Directions Api only if new location is not in already made polyline.
- Dominant language
- JavaScript
- Stars
- 1.3k
- Forks
- 210
- PR merge metrics
- No merged PRs in 30d
Description
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!
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue does not name files, tests, or an entry point. Locate the component's Directions API request and polyline update flow, then determine how an in-route location could reuse existing directions and how a changed route should trigger a fresh request; done means both cases are defined and covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- api, mobile
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100