Open oxientsoft opened 4 years ago
if any solution how to void Highway & tolls using react-native-maps-directions
this my code
<MapViewDirections origin={this.state.Origin} destination={this.state.mapRegion} //mapRegion from geolocation apikey={GOOGLE_MAPS_APIKEY} strokeWidth={6} precision="high" mode="TRANSIT" strokeColor="#12bc00" onStart={(params) => { console.log(Started routing between "${params.origin}" and "${params.destination}"`);
<MapViewDirections origin={this.state.Origin} destination={this.state.mapRegion} //mapRegion from geolocation apikey={GOOGLE_MAPS_APIKEY} strokeWidth={6} precision="high" mode="TRANSIT" strokeColor="#12bc00" onStart={(params) => { console.log(
}} onReady={result => { console.log(`Distance: ${result.distance} km`) console.log(`Duration: ${result.duration} min.`) this.setState({ Dinstance: result.distance.toFixed(2), Duration: result.duration.toFixed(2) }) }}
/>`
+1 I am also interested in a solution for this use case - more precisely, when the user is redirected to the Google Maps application, I want the "Avoid Highways" to already be selected
if any solution how to void Highway & tolls using react-native-maps-directions
this my code
<MapViewDirections origin={this.state.Origin} destination={this.state.mapRegion} //mapRegion from geolocation apikey={GOOGLE_MAPS_APIKEY} strokeWidth={6} precision="high" mode="TRANSIT" strokeColor="#12bc00" onStart={(params) => { console.log(
Started routing between "${params.origin}" and "${params.destination}"`);/>`