My client has requested the ability to show the GPS location from a phone on their website (google maps). I realise that it requires some functionality to be installed on the phone side to send the GPS coordinates.
Does anyone know which way to go on this issue? Any finished products one can use?
Thanks.
To get the coordinates, use
navigator.geolocation, which should be supported well on mobile browsers; demo: http://www.bytelevelbooks.com/code/javascript/geolocation.htmlThis is of course just the start. It then depends on your application how you use the coordinates. In any case, you should be prepared to great variation in precision, ranging from kilometers to meters. Whether the coordinates are based on GPS or something else surely affects the precision, and is affected by the device and especially its settings and its physical location.