javascript - HTML5: get device altitude -


in html5 page retrieve altitude of device (i'm testing on nexus 5 chrome mobile).

as mentioned in html5 geolocation altitude, altitude returned geolocation api null.

i've read native android apps use different approaches such pressure sensor (when available). somehow possible in html5? have other suggestions?

accessing barometer information

sadly of 2015 it's not possible access barometer information in native browser environment. lot of work has been done on writing sensor api specifications, barometers quite rare hardware feature still have not been receiving lot of attention.

it is possible bundle web application in cordova , use barometer plugin android access barometer code. means user has install application , work android.

using gps information after all

for large majority of applications need altitude information there 1 possible altitude per coordinate pair (this example not true if wish determine level you're @ in building, current gps altitude information isn't precise enough either way). in cases can request gps location , request altitude service surface database. 2 such services google elevation api (entire world) or ned point query service (us only?).


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -