[英]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? 可以看看Google地图中使用的算法吗? 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. NickT指出,谷歌地图最初使用网络提供商来获取位置,如果我将手机置于飞行模式,只要我的应用找到我的位置,只要我将手机放在谷歌地图上,他都是对的。
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)
即大多数时间精度为1000+米(对我而言至少)
ps i am using the latest location API in the play services lib ps我正在使用播放服务库中的最新位置API
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: 要回答您的问题,即使可用的网络和GPS信息可能不那么精确,某些应用程序如何如何获得非常快速的位置修复:
Most devices (including Android, apple and Microsoft as far as I am aware) also use nearby WiFi spots to pinpoint your location. 大多数设备(据我所知包括Android,Apple和Microsoft)也使用附近的WiFi点来确定您的位置。
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. 他们通过定期更新所有用户的位置数据和附近的wifi地点来实现此目的,因此建立了一个大型数据库,将特定的wifi网络(相对而言,通常距离很近)映射到地理位置。
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. 当他们想要快速定位时,他们可以查看多个输入,例如网络提供商的天线杆,GPS数据和最近的wifi网络。 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.
他们通过查看范围内的Wifi网络ID并查找他们为将其映射到某个位置而建立的数据库来完成WiFi部分。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.