谷歌地图位置如何工作? [英] How does google map location works?

查看:131
本文介绍了谷歌地图位置如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是谷歌地图或手机GPS如何能够找到我的当前位置? GPS接收机通过这些卫星获得位置坐标
,并且该位置被进一步传递给谷歌地图(或任何其他客户端)的API,然后找到地图上的确切位置。它是否正确?


某处我还看到移动塔也扮演着角色。但我的看法是,如果需要,可以使用它来跟踪移动位置,但移动应用或Google地图
使用卫星方式。对于谷歌地图应用程序(以及谷歌地图的位置如何运作),这是一个有点不准确的问题,因为谷歌地图应用程序(以及因为任何利用Google Maps API的应用程序)只是您设备上位置服务的消费者,并不用于确定当前位置本身。



因为Google地图只是一个应用程序,它可以在浏览器内运行,或作为本机应用程序运行。根据这一点,它如何获得您的位置信息的方式也可能会有所不同。

如果您从网络浏览器运行Google地图(或 WebView UIWebView ,..),它通常使用HTML 5地理位置API来确定您的位置,然后使用它来显示您在Google地图上的位置。 HTML5地理位置然后使用一些较低级别的服务来获取您的位置,例如GPS传感器,WIFI ,网络等。关于HTML 5地理位置如何确定您在SO上的位置,已经存在问题,如这一个这一个



如果您的应用程序作为独立应用程序运行,则取决于您的平台,设备传感器,网络......位置是如何确定的。因此,例如在使用GPS传感器的Android上,使用 LocationManager ,再次使用GPS或网络提供商检索位置,或者返回最后一个已知位置等。背后有许多各种有趣的技术,您可以自己查看(例如使用Wifi确定您的位置,Google有一个数据库使用匿名设备跟踪功能检索到的WIFI SSID及其位置,并且只能通过您周围的Wifi网络粗略地告知您的位置。)


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.)

这篇关于谷歌地图位置如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆