且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在iphone中使用html查找当前位置

更新时间:2023-02-26 14:40:38

您可以在Javascript中获取该位置。

You can get the location in Javascript.

api基于此规范

并且这里是一个正在运行的样本。

And here's a running sample.

一些代码提取:

function findLocation() {
    navigator.geolocation.getCurrentPosition(foundCallback, errorCallback, {enableHighAccuracy:true,maximumAge:600000});
}