访问 iPhone GPS 坐标
基本上我想做的是访问 iphone 4 上的 GPS 坐标。我没有创建任何类型的网络应用程序。除了地理定位 api 之外,我找不到太多的东西,但这似乎是为了创建网络应用程序而设计的。是否有一个 JavaScript 函数可以从手机本身调用,该函数将返回自己的 GPS 坐标。基本上我正在开发的是一个天气小部件,它创建 xmlrequest 并解析返回的数据。该小部件适用于特定的邮政编码。但是,我想看看是否可以基于 GPS 运行它。返回 xml 响应的网站也允许 GPS 坐标。只是寻找获取坐标并将其传递到此站点的最佳方法。
Basically what I am trying to do is get access to the gps coordinates on the iphone 4. I'm not creating any type of web app. I can't find too much other than the geolocation api, but that seems to be geared toward creating web apps. Is there a javascript function that I can call from the phone itself that will return its own gps coordinates. Bascially what I'm working on is a weather widget that creates an xmlrequest and parses that returned data. The widget works fine for a specific zip code. however, I am wanting to see if I can get this running based on gps. The website which returns the xml response also allows gps coords. Just looking for the best way to fetch the coords and pass them to this site.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试这样的事情:
参考文献: 移动 Safari 文档
Try something like this:
References: Mobile Safari Documentation