开发者

How to set a timeout for finding location with geo.js?

开发者 https://www.devze.com 2023-01-18 19:56 出处:网络
I use geo.js in my webapp to let user share their location. In most browsers it works fine, however in Safari it usually hangs up. I know there\'s timeou开发者_Go百科t in HTML5 geolocation, is there s

I use geo.js in my webapp to let user share their location. In most browsers it works fine, however in Safari it usually hangs up. I know there's timeou开发者_Go百科t in HTML5 geolocation, is there such thing in geo.js too?

Thanks!


You should try it directly when calling the getCurrentPosition method, something like:

geo_position_js.getCurrentPosition(show_position, error_callback, {timeout: 10000});
0

精彩评论

暂无评论...
验证码 换一张
取 消