【发布时间】:2019-12-13 13:15:11
【问题描述】:
我想问两个问题。
-
timeout选项的值在seconds或miliseconds中? - 如果到达
timeout,在哪里执行代码? (超时后做某事)
.
let wait: string;
wait = Plugins.Geolocation.watchPosition({
enableHighAccuracy: true,
timeout:5 // i dont if this is seconds or miliseconds
}, (position, err) => {
// do something
Plugins.Geolocation.clearWatch({
id: wait
});
});
// i want to detect if the location still doesnt detect, and it already time-out, i want to do something
文档太简单了。 很难理解。 https://capacitor.ionicframework.com/docs/apis/geolocation/
【问题讨论】:
标签: ionic-framework geolocation capacitor