IPhone - Native GeoLocation VS Web App GeoLocation

Here is my situation; I created a very simple web application that looks at the location of users and displays it on a Google map. Here is my code: http://pastebin.com/d3a185efd

When I test it, my location is determined to be> 500 meters from where I actually stand.

BUT

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

So my question is: is it better to use native iPhone apps with higher accuracy than web apps?

If so, why?

+6
iphone google-maps geolocation iphone-web-app
source share
7 answers

According to the specification, webapp geolocation should use any positioning method that works best in any situation, so it can theoretically be assumed that it uses GPS when it is available. The discussion related to the โ€œbest answerโ€ of rohit does not seem convincing to me - here is another one with someone reporting a similar problem to your and other users professing to get accurate gps data (scroll down to comments September 26-28) :

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

But it seems that the geolocation material is not working yet. I suspect your problem is mostly some errors.

+3
source share

Based on the following link, I believe that you get the coordinates in the web application by triangulating the tower and not using GPS. I really doubt that GeoIP can give coordinates within 500 meters.

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

+1
source share

The geolocation API allows you to use the high precision parameter.
http://dev.w3.org/geo/api/spec-source.html#position_options_interface
(But uses an extra battery, so it's probably best to use it rarely)
Have you checked this?

Boolean: enableHighAccuracy

+1
source share

I think that you get different results, because you do not notice the aspect of time. GPS uses a lot of batteries and only starts on command.

HTML5 getCurrentPosition takes a snapshot of the coordinates before GPS can accurately "enter the zone" at your position. On the other hand, the Google Maps application starts and then monitors your position, accuracy increases over time (you all know how the marker moves). HTML5 also supports this position view function.

Side Note! In my experience with the iPhone, the device will actually retain your position for a while, which means that if I run Google Maps and let it "enter the zone" in my place, close it and THEN start my webapp and use getCurrentPosition, which I I get an equally accurate reading.

Accuracy is letting GPS do the trick.

+1
source share

I think webapp relies on the geoip service, which (does its best to ...) translate your IP address into a GPS coordinate. ex: ex service

However, such a way to get the coordinate cannot be as accurate as the โ€œclassicโ€ one that uses a GPS device (for example, included in a 3G or 3Gs iphone) to really restore your actual location and not bring it closer to your best use geoip service .

UPDATE: GEOIP is used, for example, when using google maps on a laptop, but perhaps your question is: "When I use the HTML 5 position object on my web page, does it come from GPS equipment or from a geographic information service?". I could not say this, I would say that it uses the geoip service instead of GPS hardware, but I'm not 100% sure ...

0
source share

The code does not show where you are getting the position from: are you using the Navigator and Geolocation objects?

http://developer.apple.com/iphone/library/documentation/AppleApplications/Reference/SafariWebContent/GettingGeographicalLocations/GettingGeographicalLocations.html

0
source share

for google geo api first it tries to find your location on the gps of the device, if it fails, the cell triangulates (virtual gps), if it fails to use for wifi mac and ip addresses, the last attempt is to use the client IP address his location

0
source share

All Articles