この文書の現在のバージョンと選択したバージョンの差分を表示します。
次のリビジョン | 前のリビジョン | ||
reactnative:react-native-geolocation-service [2019/04/02 07:04] ips 作成 |
reactnative:react-native-geolocation-service [2019/04/03 04:56] (現在) ips |
||
---|---|---|---|
ライン 82: | ライン 82: | ||
</code> | </code> | ||
- | [[reactnative:エラー|ここのエラーが発生した]] | + | [[reactnative:エラー|ここの「Looking for JS files inエラー」が発生した]] |
+ | |||
+ | App.jsの修正 | ||
+ | <code javascript App.js> | ||
+ | ・・・ | ||
+ | import Geolocation from 'react-native-geolocation-service'; // ADD | ||
+ | ・・・ | ||
+ | async getLocation() { | ||
+ | |||
+ | // navigator.geolocation.getCurrentPosition( // CHANGE | ||
+ | Geolocation.getCurrentPosition( | ||
+ | (resolve) => { | ||
+ | console.log("resolve") | ||
+ | const location = JSON.stringify(resolve) | ||
+ | console.log(location) | ||
+ | ・・・ | ||
+ | |||
+ | |||
+ | </code> |