HTML5地理位置海拔高度 [英] HTML5 Geolocation Altitude

查看:488
本文介绍了HTML5地理位置海拔高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



正确报告经度和纬度,但海拔高度总是以'null'的形式返回。

我正在为使用html5地理定位API玩这个项目。 。

测试设备是Nexus 4和5,有没有其他人有类似的问题,这个api?

解决方案

绝对!它似乎是一个可能是浏览器特定的问题。由于我在IPhone和Android上开发,所以我一定要在默认浏览器(Safari和Android的web浏览器)上试用我的HTML5应用程序。我新的iPhone 5S可以提供​​高度,但是我的三星Galaxy S4继续显示null。我构建了我的程序的原生Android应用程序版本,以确保它不是设备问题。它回来了,我的高度很好。没有答案,但仍在研究中,因为高度对我们来说同样重要。



我也在同一部手机上使用Chrome浏览器进行了验证(S4);没有高度,除非使用我的本地应用程序。


I was playing with the html5 geolocation api for a project I'm working on.

Latitude and longitude are reported correctly but altitude is always returned as 'null'.

Testing device is Nexus 4 and 5, has anybody else had similar problems with this api?

解决方案

Absolutely! it appears to be an issue that may be browser specific. Since I develop on both IPhones and Android I make sure to try my HTML5 apps on the default browsers (Safari and Android's webBrowser). My new IPhone 5S picks up the altitude just fine, but my Samsung Galaxy S4 continues to display "null". I built a native Android app version of my program to make sure it wasn't a device issue. It comes back with my altitude just fine. No answer, but still researching as altitude is important to us as well.

I also just verified using Chrome browser on same phone (S4); no altitude unless using my native app.

这篇关于HTML5地理位置海拔高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆