Offline user location in Mapbox - ios

Is it possible to update user's location without using the network? I'm using MapBox for my application, and i really need to know about it. It seems obvious that user can see where he is using GPS, but I am not sure yet.

you mean locally? you can get GPS location on devices and via the browser's HTML5 GeoLocation, and technically just feed that to the mapbox map via the regular javascript (assuming you have the required files accessible locally).
http://www.w3.org/TR/geolocation-API/
here's an example using google maps:
http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_geolocation_map
the location isn't 100% accurate as it guesses by IP address, WiFi signals and GPS data (if available).
you didn't specify, but if you're talking about native code, you can do the same thing with different methods on iOS.

Related

Is mobile browser geolocation as good as native?

When you open a webpage on a phone/tablet, and use
navigator.geolocation.getCurrentPosition()
Do we get the same results that when we use Google Play services location API?
And do we get the same results that when we use iOS native location API?
Thank you!
It is really depends to what level of information is available in both OS.
For example, if both GPS chip is working in both Android and iOS and locked to the right numbers of satellite, then you should get the same results.
However, when GPS is not available, each API uses their own way such as wifi, cell tower ID or IP address to estimate the location, then you will find some discrepancy.
Reference: http://www.geolocation.com

Getting User's Location Without Permission

This website finds my location with a reasonable presicion. If i use mobilephone the website finds my exact location. If it is possible without asking permission why most of them asks me before getting my location? Isn't it makes personal security vulnerabilities?
From the same page you gave us:
Webkay uses the Google Geolocation API to locate you. This is an
educated guess and never as accurate as a GPS Location. The accuracy
depends on your location and also on your connection type. If you are
on a mobile network expect an error of up to 50km. This example just
tries to demonstrate how accurate a website can guess your location
without asking you for permission to access your GPS.
A site only needs permission, if it wants to enable your device's GPS. Also, without the permission, the guessed location is heavily dependent on your mobile carrier signal and IP address. If you are in a location with a lot of mobile towers, the location (obviously) will get more precise.
A site can use the information from all near mobile towers around you to triangulate the position and guess where you are. Think of it like a mesh.
For example: I am using a computer to write this now and the location is easy ~100km off, because it has only my IP adress to estimate the location.

How many ways we can access user's location iOS?

I know we can access user's location using geolocation in iOS. I want to know what other ways we can access user's location off course with his permission. I also heard we can access user's location using network/Internet etc.
All geolocation of the device is done via the CoreLocation framework. The specifics of what method(s) used to determine the location is not provided through the framework. The position can be determined via WiFi proximity to a known AP, cellular proximity to a tower mapped by the carrier, or most accurately via the GPS system. Not all methods are available on all devices, obviously. Rather than knowing how location was determined, you merely request location within a desired level of accuracy, and the framework will call back and notify you of an update in position. The actual position is not guaranteed to be pinpoint accurate.

Uber Live Driver Route GPS Update

I am getting into ioS development. Does anyone know how apps like Uber achieve live gps updates of driver's en route? You can see exactly where the driver is on the map and it's a live feed.
Can this be achieved through use of Google Maps API?
Thanks.
Basically, all they need is that the Driver has a device which has GPS and internet connection. Then the device locates itself (periodically) and sends the location to the central server, in which the location along side information identifying the car is stored.
And then the map view simply fetches the data from the database and shows the cars in the Map. And again it simply refreshes the data with timer.
So the Google Maps API, alongside with any other Maps offering can indeed be used for showing the map and the cars in it. But for the positioning parts, as well as for the server side implementations you likely would need to search for other offerings as well.

iOS - Assisted GPS

How would I go about figuring the position of someone inside (or outside) of a given area (such as a building) using assisted GPS with IOS app?
Is it possible to have it accurate enough withing a few feet?
Is this the right way to go about it?
Is it possible to utilize more than one wifi connection in the calculation?
Your app can use the Core Location framework to determine the device location. Core Location will use whatever hardware is at its disposal to determine the device location to the degree that you request. For example, some devices have WiFi but no GPS; others have WiFi, GPS, and cellular radios. Future devices may have other location technologies built in.
The point is that as an application programmer, you don't worry about that. Instead, you say: "give me a location that's accurate to 100 meters" or "let me know when the device has moved from the current spot by more than 10 meters" or "give me the location with the best accuracy you can manage."
Again, take a look at Apple's Core Location documentation to get a better idea of how it all works.
If you're looking to track a device with, say, 1-meter resolution inside a building, you're not likely to get that from Core Location. There's been research on triangulating position using known locations of WiFi transceivers, but nothing that's implemented in any commercial smart phone that I know of. I don't believe that iOS gives you easy access to the data you'd need to do this, so it's probably not a possibility. You could, however, go the other way: program several WiFi receivers around the building to listen for any nearby devices, use that information to triangulate the devices' positions, and then make that information available via some web service.

Resources