简体   繁体   English

Google地图如何快速找到我的位置,但是当我使用位置管理器时,我需要等待40秒以上

[英]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.

相关问题 Google Maps for Mobile“我的位置”功能如何工作? - How does the Google Maps for Mobile “My Location” feature work? 如何在Java代码中使用Google Maps API来获取指定位置的坐标? - How do I use Google Maps API in a Java code to fetch coordinates of specified location? 如何在不使用谷歌地图和其他地图的情况下获取用户当前位置? - How can I get user current location without using google maps and other maps? 构建我的应用并安装Google Maps API之后,我倾向于搜索位置时,我的APP就会崩溃 - After builing my app and Installing Google Maps API, My APP crashes anytime I tend to search for Location 使用 Google 地图 API 时没有显示“我的当前位置”按钮 - No 'My Current Location' button showing when using Google Maps API 如何使用谷歌地图 API 在 android 工作室找到我当前的位置? - How to find my current location in android studio using Google Maps API? 如何使我的应用接收诸如Google Maps之类的位置信息 - How to make my app receive location intents like Google Maps 我的位置管理器准确性不高 - I am having trouble with my Location Manager with its accuracy 在setMyLocationEnabled eclipse上在Google地图上定义我的位置 - define my location on google maps on setMyLocationEnabled eclipse 要填写我的位置我需要填写什么? 就像Google的蓝点一样 - What to I need to fill to get my location? Like the blue dot google has
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM