React-native-google-places-autocomplete: getCurrentPosition is not working, navigator is undefined

Created on 10 Jan 2020  路  2Comments  路  Source: FaridSafi/react-native-google-places-autocomplete

GooglePlacesAutocomplete.js:191
navigator.geolocation.getCurrentPosition(

bug

Most helpful comment

You just need to update your geolocation reference

yarn add @react-native-community/geolocation

Then in your main App.js

navigator.geolocation = require('@react-native-community/geolocation');

Don't forget pod install for iOS

All 2 comments

You just need to update your geolocation reference

yarn add @react-native-community/geolocation

Then in your main App.js

navigator.geolocation = require('@react-native-community/geolocation');

Don't forget pod install for iOS

You just need to update your geolocation reference

yarn add @react-native-community/geolocation

Then in your main App.js

navigator.geolocation = require('@react-native-community/geolocation');

Don't forget pod install for iOS

This is works

Was this page helpful?
0 / 5 - 0 ratings

Related issues

diegothucao picture diegothucao  路  3Comments

RajanPN picture RajanPN  路  3Comments

macs03 picture macs03  路  3Comments

miguel-pm picture miguel-pm  路  3Comments

yasirdev picture yasirdev  路  3Comments