Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mobile GPS web application

I need to develop a web app. (PHP) 100% for mobile phones and need to get the information from the mobile phone GPS, in order to get the user's current position. My question is, what should I do?

I know PHP but I'm completely clueless about the GPS part (never worked with them before). All i'm looking is for headsup to see if I can handle the job or just reject it.

I've heard that the W3 geolocation API does a very good job but after testing it i'm not convinced about the accuracy and browser support. I don't want to use Google's gears due to the fact that it must be downloaded first.

like image 782
Ben Avatar asked Jul 21 '10 01:07

Ben


2 Answers

I do think the W3C Geolocation API is a good place to start: it has growing acceptance on mobile phones, is an open standard and abstracts away all the device-specific APIs.

It's true that the accuracy may not be perfect, but that's because the phone itself may not always know perfectly where it is. The API gives you a couple ways to work around this: if you need high accuracy, you can hint to the device that you want an accurate result even at the cost of power/time with the enableHighAccuracy flag and set a long timeout parameter to allow the device to use GPS to find a location. Also, all positions are returned with an accuracy value for 95% confidence -- if the error is too high (often phones will return a high error on the first request), you can request the location again, specifying that you don't want a cached location.

like image 111
npdoty Avatar answered Oct 18 '22 18:10

npdoty


It depends on the device but some mobile app frameworks have done all the work for you and have Extensions to do this, check out jqTouch for the iPhone:

http://jqtouch.com/

More specifically:

http://code.google.com/p/jqtouch/wiki/Extensions

like image 30
Kieran Andrews Avatar answered Oct 18 '22 18:10

Kieran Andrews