getLocation2(timeout, cacheTimeout) {
console.log('[ getLocation2 test..... ]::-188')
let timeId;
setTimeout(() => {
console.log("[ getLocation2 timeout ]::-190 ", timeout, "s");
}, timeout);
try {
navigator.geolocation.getCurrentPosition(
(position) => {
clearTimeout(timeId);
console.log("[ getLocation2 success] ::", position);
},
(e) => {
clearTimeout(timeId);
console.log("[ getLocation2 fail] ::", e);
},
{
timeout: timeout * 1e3,
maximumAge: cacheTimeout * 1e3,
}
);
} catch (error) {
console.log('[ getLocation2 error ]::-207', error)
}
}
IOS 16.4 系统中小程序webview&app webview中内嵌H5 navigator.geolocation.getCurrentPosition无响应(超时),必现;
navigator.geolocation.getCurrentPosition
是什么
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
解决了吗?着急啊
解决了吗?着急啊