Geolocation-WatchPosition 尚未实现
Geolocation-WatchPosition is not yet implemented
我正在使用 react-native-geolocation-service 来获取位置。
获取当前位置没有任何问题,我的当前位置正在移动更新正常。但 watchId 始终是未定义的,并向我显示 "WatchPosition is not yet implemented" 的警告。它也没有显示任何错误
这是我在 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
现在我使用 React Native 版本来获取 watchPosition
navigator.geolocation.watchPosition( (position) => {
console.log(position)
}))
它对我来说很好用。
我正在使用 react-native-geolocation-service 来获取位置。 获取当前位置没有任何问题,我的当前位置正在移动更新正常。但 watchId 始终是未定义的,并向我显示 "WatchPosition is not yet implemented" 的警告。它也没有显示任何错误 这是我在 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
现在我使用 React Native 版本来获取 watchPosition
navigator.geolocation.watchPosition( (position) => {
console.log(position)
}))
它对我来说很好用。