问题描述
正确报告经度和纬度,但海拔高度总是以'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地理位置海拔高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!