【发布时间】:2018-05-11 12:49:24
【问题描述】:
我正在使用 react-native-geolocation-service 来获取位置。 获取当前位置没有任何问题,并且我当前的位置正在移动更新正常。但 watchId 始终是未定义的,并向我显示“WatchPosition 尚未实现”的警告。它也没有显示任何错误 这是我在 componenetDidMount 中所做的
this.watchID = Geolocation.watchPosition(
(position) => {
console.log("position")
},
(error)=>{
console.log(error } ,
{ enableHighAccuracy: true, timeout: 20000, maximumAge: 0,
distanceFilter:
3 }
);
Is there any idea to solve it
【问题讨论】:
标签: javascript react-native geolocation