bramus / react-native-maps-directions

Directions Component for `react-native-maps`
MIT License
1.25k stars 197 forks source link

Get duration of the remaining trip #181

Closed musabgulfam closed 2 years ago

musabgulfam commented 2 years ago

How do I get the duration of the trip, one way is to get it from the onReady prop. But is there anyway to get the duration afterwards, because onReady callback is only executed once the direction is in 'ready' status.

zoolle commented 2 years ago

@musabgulfam if you change any of the origin or destination values it will re-render so onReady will fire again you might also use resetOnChange: true

musabgulfam commented 2 years ago

Thank you very much @zoolle, the issue is resolved.