I am working to develop a web app that can utilize a GNSS receiver connected to a smart device to plot points of interest and display them on a map. I am trying to capture the enhanced location data that is being provided via the GNSS receiver. Connecting a GNSS receiver to an android phone or tablet, you have to enable mock locations on the device. The web app works while the GNSS unit is not connected, but once it connects, Chrome is unable to load any location at all, using either getcurrentposition() or watchposition(). The team I am working with thinks the browser might not recognize the units the GPS device is measuring (degrees minutes seconds as opposed to decimal degrees), but I am not so sure this is the case. The Google maps app works while a device is connected to the GPS unit, but maps.google.com does not, which makes me think this is a browser issue. I've also found other apps from the app store that are able to take readings from the device's mock locations. Not being able to use the improved accuracy of the GNSS unit limits the app to the GPS information the phone/tablet provides. Any thoughts about how I could make this work?
Related
My question is how does google map or mobile GPS able to find mine current location ?
My high level understanding after reading this article is , GPS receiver gets the location coordinates through these satellites
and this location is further passed to Google Map(or any other client) API which then locates the exact location on map. Is it correct ?
Somewhere i also read that Mobile towers also plays the role. But my unserstanding is that this can be used to track the mobile location if required but mobile apps or Google maps
uses the satellite approach. Right ?
It's a bit inaccurate question to ask "How does google map location works", because Google Maps app (as well as any application leveraging google maps API) is just a consumer of location services on your device and is not used to determine the current location itself.
Because Google Maps is just an application, it can be run inside browser, or as native application. Depending on that, the way how it gets to your location information may also vary.
If you run the Google Maps from web browser (or WebView, or UIWebView,..) it usually uses HTML 5 geolocation API to determine your location and then use that to show your position on Google Maps. HTML5 geolocation then uses some lower level services to get your location, like GPS sensor, WIFI, network etc. There are already questions on how HTML 5 geolocation determines your position on SO, like this one or this one.
If your app is run as standalone application, it depends on your platform, your device sensors, your network,.. how the location is determined. So for example on Android with GPS sensor, LocationManager is used, which retrieves the location again using GPS, or from network provider, or returns last known location, etc. There's a lot of various interesting techniques behind this, which you can look up yourself (For example to determine your location using Wifi, Google has a database of WIFI SSIDs and their locations retrieved using anonymous device tracking and is able to roughly tell your location only from Wifi networks around you.)
I have a PhoneGap application that has a Google Map view that drops pins for locations geo-encoded by Google Maps. I’m using the free client-side API since from my understanding each user that installs the app has his/her own usage limits (25k per day), that they will likely never exceed. The app is free, but I was paid to build the app.
If this goes to the app store am I breaking the law? I feel like a PhoneGap mobile application is a gray area since there is no server and no single IP that can abuse the service.
I'm not sure who you did pay.
Anyway, the Google Maps API TOS describes this at 9.1.2 Exceptions > Mobile Applications.
https://developers.google.com/maps/terms#section_9_1_2
(b) Mobile Applications.
(i) The rule in Section 9.1.1(a) (Free Access) does not apply if your Maps API Implementation is used in a mobile application that is sold for a fee through an online store and is downloadable to a mobile device that can access the online store.
And Google Maps API for work does not work on PhoneGap, because there is no domain.
I have a web page that displays the users location on a small Google map
e.g.
Google Static Map
However my colleagues who have blackberrys seem to get the usage limit exceeded image all the time:
Some of these are work blackberry users and some are personal devices. So is google using the BES address as the source? Surely all blackberry users must have this problem if that was the case?
There are two aspects to understand here. One is that the Google static maps API is rate limited based on IP addresses. This is intended to spread out the usage limits. The docs for maps say the limit is "25 000 free static map requests per application per day."
If you aren't using an API key, that limit applies per IP address.
The second thing to understand is that BlackBerry devices all access the internet through a VPN that is tunneled through the mobile operator's data plan. This is what BIS service provides, along with email access. When a BIS user browses the internet, their IP address will come from one of RIM's datacenters, and not from the mobile operator's datacenter. There is one datacenter for all of North America. RIM publishes their IP addresses. This means all BlackBerries with BIS service will show up from a limited set of IP addresses.
Combining these two pieces of knowledge together, we have an API whose limits are based on IP addresses, and a large set of devices that use a limited set of IP addresses. This is why BlackBerry devices run out of Google Maps API quota, even if another non-BlackBerry device using the same mobile operator does not see the quota issue.
I know the browser shares my IP address and details of nearby wireless networks to determine my location, but what sort of info does it know about nearby wifi networks?
For example, where I live are no public wireless networks, and from my home I can see about 5 private networks, yet my location is determined within 20 meters. With there being no open networks nearby, how does Google determine my location? The only way I can think of is that Google mapped the locations of all wireless networks when they mapped streets for Street View.
I've searched about online, but all I can't find any specific details.
The data sent by Firefox to Google is for all visible access points, public or private. For each access point detected, it sends the following data to https://www.google.com/loc/json:
"mac_address": "01-23-45-67-89-ab",
"signal_strength": 8,
"age": 0,
"SSID": "MyAccessPoint"
where
mac_address is the mac address of the WiFi node.
signal_strength is current signal strength measured in dBm.
age is the number of milliseconds since the WiFi node was detected.
SSID is the name or ESSID of the WiFi node.
The georeferenced WiFi data used to geocode your request was collected when Google was driving around taking pictures for StreetView.
It is important to note that, however, that this is how the HTML5 geolocation API is implmeneted on Firefox using Google's Geolocation Services. This is an implementation, not a specification. If your device has a built-in GPS, it is probably desirable that your HTML5 implementation queries the GPS directly, rather than using a geolocation service.
Even firefox implements this feature differently on Windows and Linux. Using a current Firefox on Windows, details of all visible WiFi nodes are sent to Google. Using a current Firefox on Linux, only details of the currently connected WiFi node is sent, due to the reliance on libiw for access point data.
As another answerer noted, Safari uses Skyhook Wireless's service which does much the same thing as Google's Location Services.
Data is gathered by Skyhook Wireless (Wikipedia), and they make no distinction between public and private wifi points - they log the locations of all of them. I wouldn't be surprised if the Google Street View vans also logged location data for access points.
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?
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.
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
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
I think you are getting different results since you are overlooking the aspect of time. The GPS uses lots of battery and only starts up on command.
The HTML5 getCurrentPosition takes a snapshot of the coordinates before the GPS has had a chance to accurately 'zone in' on your position. The Google Maps app on the other hand starts and then watches your position, accuracy increasing over time (you all know how the marker moves). HTML5 also supports this feature of watching the position.
Side note! In my experience from the iPhone, the device will actually store your position for a little while, meaning that if I start up Google Maps and let it 'zone in' on my position, close it and THEN start my webapp and use getCurrentPosition I get an equally accurate reading.
Accuracy is all about letting the GPS do its thing..
I think that a webapp relies on a geoip service that (does its best to...) converts your IP address into a GPS coordinate.
ex: service ex
However such way to retrieve a coordinate cannot be as accurate as the "classic" one that uses a GPS device (such as the one included in the 3G or 3Gs iphone) to really retrieve your actual location and not approximate it at its best like a geoip service.
UPDATE: GEOIP is used when using google maps on a laptop for instance, but maybe your question was : "when I use the HTML 5 position object in my web page, does it comes from the GPS hardware or from a geoip service ?". This I couldn't really tell, I would say it uses geoip service instead of GPS hardware but I'm not 100% sure...
The code doesn't show where you get position from - are you using Navigator and Geolocation objects?
http://developer.apple.com/iphone/library/documentation/AppleApplications/Reference/SafariWebContent/GettingGeographicalLocations/GettingGeographicalLocations.html
for google geo api first it tries to find your location by device gps , if failed it goes cell triangulation (virtual gps) if failed it try to use to wifi mac and ip addresses , the last try is to use the client IP to get his location