[GIS] Accessing GPS data with JavaScript in real time

gpsjavascript

Is it possible to access GPS data in real time on a smart phone with JavaScript (without an android or ios application I mean)?

Best Answer

Yes. You are looking for the Geolocation API, here's a simple demo. Here is sample code from Dive Into HTML5 and HTML Rocks. Works great from web pages hosted on iOS and Android phones, it's a simple API to use. Strictly speaking it's not GPS; it's a generic location API. On mobile devices like iPhones location is often provided by WiFi or cell tower fixes and not the GPS radio.