React-native: TypeError: Cannot read property getCurrentPosition of undefined

Created on 14 Jul 2019  路  2Comments  路  Source: facebook/react-native

I have tried everything I can and I can't seem to find a solution. when I'm trying to get current location, I get this error.
Simulator Screen Shot - iPhone X - 2019-07-14 at 22 33 59

Below is my code for getting the current location.
Screenshot 2019-07-14 at 22 34 10

my package JSON looks like this:
"dependencies": {
"jetifier": "^1.6.2",
"react": "16.8.6",
"react-native": "0.60.0",
"react-native-gesture-handler": "^1.3.0",
"react-native-google-places-autocomplete": "^1.3.9",
"react-native-maps": "^0.25.0",
"react-native-onboarding-swiper": "^1.1.0",
"react-navigation": "^3.11.0"
},
Any solution?

Bug Ran Commands

Most helpful comment

you need to use
https://github.com/react-native-community/react-native-geolocation
geolocation has been pulled out in latest react native 0.60

All 2 comments


Thanks for submitting your issue. Can you take another look at your description and make sure the issue template has been filled in its entirety?

馃憠 Click here if you want to take another look at the Bug Report issue template.

you need to use
https://github.com/react-native-community/react-native-geolocation
geolocation has been pulled out in latest react native 0.60

Was this page helpful?
0 / 5 - 0 ratings