简体   繁体   中英

How does Google maps find my location quickly but when I use Location Manager I need to wait 40+seconds

Is it possible to look at the algorithm used in Google maps? If not, are there any good algorithms for finding a fine location quickly?

edit

NickT has pointed out that google maps uses the network provider to initially get the location, and if I put my phone on airplane mode it would take google maps just as long as my application to find my location, he was right.

My question now is, how does google maps find a fairly accurate location from The network provider even though the network provider usually not very accurate. ie accuracy 1000+ meter most of the time (for me atleast)

ps i am using the latest location API in the play services lib

To answer your question, how do some apps get a very quick location fix even though network and GPS information available may not be that precise:

Most devices (including Android, apple and Microsoft as far as I am aware) also use nearby WiFi spots to pinpoint your location.

They do this by regularly updating location data and nearby wifi spots from all users and hence building up a large database mapping particular WiFi networks (which are typically very short range, relatively speaking) to geographic locations.

When they want to get a quick location fix they can look at multiple inputs, eg the network provider masts, the GPS data and the nearest wifi networks. They do the WiFi part by seeing what Wifi network ids are in range and looking up the database they have built to map this to a location.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM