Open karimcambridge opened 4 years ago
how to solvev this error
+1
+1
react-native-maps-directions Error on GMAPS route request, ZERO_RESULTS - node_modules\react-native\Libraries\YellowBox\YellowBox.js:71:8 in console.warn - node_modules\expo\build\environment\muteWarnings.fx.js:18:23 in warn - node_modules\react-native-maps-directions\src\MapViewDirections.js:266:10 in fetch.then.then._catch$argument_0 - node_modules\promise\setimmediate\core.js:37:14 in tryCallOne - node_modules\promise\setimmediate\core.js:123:25 in setImmediate$argument_0 - node_modules\react-native\Libraries\Core\Timers\JSTimers.js:146:14 in _callTimer - node_modules\react-native\Libraries\Core\Timers\JSTimers.js:194:17 in _callImmediatesPass - node_modules\react-native\Libraries\Core\Timers\JSTimers.js:458:30 in callImmediates * [native code]:null in callImmediates - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:407:6 in __callImmediates - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:143:6 in __guard$argument_0 - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:384:10 in __guard - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:142:17 in __guard$argument_0 * [native code]:null in flushedQueue * [native code]:null in invokeCallbackAndReturnFlushedQueue [Unhandled promise rejection: TypeError: undefined is not an object (evaluating '_ref.distance')] - node_modules\react-native-maps-directions\src\MapViewDirections.js:184:26 in Promise.all.then$argument_0 * [native code]:null in reduce - node_modules\react-native-maps-directions\src\MapViewDirections.js:182:22 in Promise.all.then$argument_0 - node_modules\promise\setimmediate\core.js:37:14 in tryCallOne - node_modules\promise\setimmediate\core.js:123:25 in setImmediate$argument_0 - node_modules\react-native\Libraries\Core\Timers\JSTimers.js:146:14 in _callTimer - node_modules\react-native\Libraries\Core\Timers\JSTimers.js:194:17 in _callImmediatesPass - node_modules\react-native\Libraries\Core\Timers\JSTimers.js:458:30 in callImmediates * [native code]:null in callImmediates - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:407:6 in __callImmediates - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:143:6 in __guard$argument_0 - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:384:10 in __guard - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:142:17 in __guard$argument_0 * [native code]:null in flushedQueue * [native code]:null in invokeCallbackAndReturnFlushedQueue
This error is happening when you try to use a directions from one island to another
<MapViewDirection destination={destination} origin={origin} onReady={onReady} onError={onError} apikey={GOOGLE_API_KEY_PLACES} strokeWidth={3} optimizeWaypoints={true} // Billing? timePrecision={'now'} waypoints={[]} />
The onError isn't called else I would just handle the error there.
Same error no solution yet.
I'm having this issue too, last entry here was two years ago, any solution?
But i am using same island , i mean country but error still remains
I think I got it, I just declare it conditionally and didn't throw the error anymore
{coordenates && destinations ? (
<MapViewDirections
origin={{
latitude: coordenates?.latitude || 0,
longitude: coordenates?.longitude || 0,
}}
waypoints={destinations.map(dest => ({
latitude: dest.latitude,
longitude: dest.longitude,
}))}
language="ES"
destination={{
latitude: destinations[destinations.length - 1].latitude,
longitude: destinations[destinations.length - 1].longitude,
}}
apikey={GOOGLE_MAPS_API_KEY}
strokeWidth={5}
resetOnChange={false}
tappable={false}
timePrecision="now"
mode="DRIVING"
strokeColor={theme.colors.accentblue[100]}
/>
) : null}
Hope this helps.
have you found any solution yet?
same issue in RN 0.74
This error is happening when you try to use a directions from one island to another
The onError isn't called else I would just handle the error there.