Open karimcambridge opened 4 years ago
Your tests probably included using all the properties.
https://github.com/bramus/react-native-maps-directions/blob/80c0ae52c7640ca0acfb8af95345014c6f624e94/src/MapViewDirections.js#L138 might be the issue, as I don't use splitWaypoints
Also check out https://github.com/bramus/react-native-maps-directions/blob/80c0ae52c7640ca0acfb8af95345014c6f624e94/src/MapViewDirections.js#L172
I found this out as adding waypoints={[]}
as a prop fixed it.
Hmmz, I've tested with only setting origin
and destination
(and an apikey
of course) and that worked fine.
The value of initialWaypoints
is set to default to []
in case no waypoints
are given, on line 81:
What platform are you using? Perhaps it has something to do with the runtime being used … I've seen that happen before, where the local build – which uses using V8 – sported newer ECMAScript Language features than the runtimes on the devices.
"dependencies": {
"@expo/vector-icons": "^10.0.6",
"@react-native-community/slider": "^2.0.8",
"@twotalltotems/react-native-otp-input": "^1.2.1",
"axios": "^0.19.2",
"expo": "^36.0.2",
"expo-asset": "~8.0.0",
"expo-cellular": "^2.0.0",
"expo-constants": "~8.0.0",
"expo-facebook": "^8.0.0",
"expo-font": "^8.0.0",
"expo-google-app-auth": "^8.0.1",
"expo-linear-gradient": "~8.0.0",
"expo-location": "~8.0.0",
"expo-permissions": "~8.0.0",
"expo-screen-orientation": "^1.0.0",
"expo-sms": "^8.0.0",
"react": "16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz",
"react-native-country-picker-modal": "^1.10.0",
"react-native-dotenv": "^0.2.0",
"react-native-gesture-handler": "^1.6.0",
"react-native-google-autocomplete": "^0.1.8",
"react-native-maps": "^0.27.1",
"react-native-maps-directions": "^1.7.6",
"react-native-masked-text": "^1.13.0",
"react-native-paper": "^3.6.0",
"react-native-reanimated": "^1.7.0",
"react-native-safe-area-context": "^0.7.3",
"react-native-screens": "^1.0.0-alpha.23",
"react-native-unimodules": "^0.7.0",
"react-navigation": "^4.3.1",
"react-navigation-drawer": "^1.4.0",
"react-navigation-stack": "^1.9.3",
"react-navigation-tabs": "^1.2.0",
"reanimated-bottom-sheet": "^1.0.0-alpha.19",
"socket.io-client": "^2.3.0",
"styled-components": "^5.0.1"
},
Using expo
I probably make use of up to ES9. I try to stay updated with my coding.
https://github.com/bramus/react-native-maps-directions/blob/80c0ae52c7640ca0acfb8af95345014c6f624e94/src/MapViewDirections.js#L161 in waypoints.map() I am getting waypoints = null
I am using "react-native-maps-directions": "^1.8.0"
I am confident that I am on version 1.7.6.
I cleared npm cache, also expo cache.