如何了解网络用户的位置?

发布于 2024-09-29 00:34:09 字数 486 浏览 0 评论 0原文

我们已经开始开发位置感知紧急服务的应用程序。用户可以通过电脑、智能手机甚至WAP连接。

我们面临的问题是,我们不知道如何获取请求服务的用户的位置。如果是具有GPS功能的智能手机,则可以通过应用程序进行定位。我见过谷歌地图在无 GPS 的智能手机(如诺基亚 E 系列)中使用 BTS 塔的位置来定位手机。但我在诺基亚网站上找不到任何可用于获取该位置或基于 BTS 塔的定位服务的 API。

主要问题仍然是计算机。如果我能找到电脑所在的城市就足够了。我在几个网站(如 ip2location.com)中看到 IP 地址的定位达到城市级别(有时甚至更多)。难道就没有其他方法可以免费定位IP地址吗?

如果我总结一下我的问题 -

  1. 如何获得基于 BTS 塔的手机定位服务?
  2. 如何定位用户的IP地址至少到城市级别?
  3. 如何将经纬度转换为地址(至少达到城市级别)?免费?
  4. 如何将地址转换为经纬度?免费?

提前致谢。

We have started developing an application for location aware emergency service. The users can connect through computer,smart phone or even through WAP.

The problem we are facing is, we don't know how to get the location of the user who is asking for service. If it is GPS enabled smart phone, it can be located though the app. I have seen google map locating the cell phone using BTS tower's location in GPS-less smart phones (Like Nokia E-series). But I couldn't find any API in Nokia site which I can use to get that location or BTS tower based locating service.

And the main problem remains for the computer. It is enough if I can locate the city for computers. I have seen in several sites (like ip2location.com) locating the IP address up to the city level (sometimes more). Isn't there any other way to locate IP address for free of charge?

If I summarize my questions-

  1. How to get BTS tower based location service for cell phones?
  2. How to locate user's IP address upto at least city level ?
  3. How to convert the latitude-longitude into address (at least up to city level)? free of charge?
  4. How to convert the address into latitude-longitude? free of charge?

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

谁人与我共长歌 2024-10-06 00:34:09

第4个是地理编码(第3个被称为......反向地理编码)

看看android的源代码,它似乎是基于蜂窝塔进行三角测量(当没有GPS或WiFi可用时)

Number 4 is geocoding (and #3 is called ...... reverse geocoding)

Look at the source for android, it seems to triangulate based on cell-tower (when no GPS or WiFi are available)

过期情话 2024-10-06 00:34:09

有一些常见的手机信号塔三角测量(或者越来越常见的 WiFi 网络三角测量)提供商:Skyhook Wireless、Google 和 Apple。

您可以尝试与这些公司进行交易,或者在每个人的设备上安装他们的定制软件,但这听起来工作量很大。我认为更成功的方法是利用一些可以在很多设备上运行的框架抽象,而无需您的软件处理每个细节。

如果您的用户使用 Web,W3C 地理定位 API 可以为支持它的现代浏览器(台式机、笔记本电脑和移动设备)提供对设备当前位置的与实现无关的访问。正如您所看到的,还有特定于平台的本机框架(iPhone 和 Mac OS X 上的 CoreLocation、Windows 7 位置平台、Android 的 LocationManager 等)。

如前所述,地理编码和反向地理编码服务可以帮助您完成经纬度坐标和城市地址之间的转换步骤,反之亦然。

There are a few common providers of cell-tower triangulation (or increasingly common, WiFi network triangulation): Skyhook Wireless, Google and Apple.

You could try to make deals with these companies, or install their custom software on everyone's devices, but that sounds like a lot of work. I think more successful will be to take advantage of some framework abstraction that will work on a lot of devices without your software having to deal with each detail.

The W3C Geolocation API provides an implementation-agnostic access to a device's current location for modern browsers (on desktop, laptop and mobile) that support it, if your users are using the Web. As you've seen, there are also native platform-specific frameworks (CoreLocation on iPhone and Mac OS X, the Windows 7 Location Platform, Android's LocationManager, etc.).

As mentioned already, geocoding and reverse-geocoding services can help you with the step for translating between lat-lon coordinates and civic addresses, and vice versa.

北音执念 2024-10-06 00:34:09

如果您不关心超精细的准确性,并且不想通过请求用户访问其位置的权限的警报来惹恼用户,那么您可以使用类似 FreeGeoIP。我写了一个小的 jQuery 插件来利用它。请参阅定位器。也支持 jsonp 请求,因此您可以从任何网站使用它,包括仅静态 html 网站。

If you don't care about super-fine accuracy, and you don't want to annoy your user with an alert requesting their permission to access their location, then you can make use of something like FreeGeoIP. I've written a small jQuery plugin that makes use of this. See the Locaternator. Supports jsonp requests too so you can use it from any website, including static html only webs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文