Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone - Native App GeoLocation VS Web App GeoLocation

Here's my situation; I've built a very simple web app that looks up a users location and plots it on a Google map. Here's my code: http://pastebin.com/d3a185efd

When I test it, my location is detected as being >= 500 meters from where I actually stand.

BUT

When I open up Google Maps or Gowalla my location is correct to within <20 meters?

So my question is: Do native iPhone apps benefit from a higher accuracy rate than web apps?

If so, why?

like image 992
Sam Avatar asked Jan 21 '10 15:01

Sam


3 Answers

According to the specification, webapp geolocation should use whatever positioning method works best in any situation - so in theory, one would assume it uses GPS when available. The discussion linked in the "best answer" by rohit doesn't seem conclusive to me - here is another one, with someone reporting a similar problem to yours and other users professing to getting accurate gps data (scroll down to comments 26-28 Sept):

http://www.thecssninja.com/javascript/geolocation-iphone

But it does seem like the geolocation stuff is buggy still. I'd suspect your problem is basically that, some bug.

like image 149
Anders Sundnes Løvlie Avatar answered Sep 30 '22 19:09

Anders Sundnes Løvlie


Based on the following link, I believe you are getting coordinates in web app through tower triangulation and not using GPS. I really doubt if GeoIP can give coordinates within 500 meters.

http://phonegap.lighthouseapp.com/projects/20116/tickets/16-navigatorgeolocation-does-not-make-use-of-gps-data

like image 23
rohit Avatar answered Sep 30 '22 19:09

rohit


The geolocation API allows for a high accuracy parameter.
http://dev.w3.org/geo/api/spec-source.html#position_options_interface
(But uses extra battery, so probably best use sparsely)
Have you tested that?

Boolean: enableHighAccuracy

like image 24
GDmac Avatar answered Sep 30 '22 17:09

GDmac