开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜