【问题标题】:Google Maps API v3: Geocoder.geocode using IP Address Multiple LatLngGoogle Maps API v3:使用 IP 地址多个 LatLng 的 Geocoder.geocode
【发布时间】:2013-02-05 10:43:26
【问题描述】:

我正在使用geocoder.geocode(address: <ip_address>, function(results, status){//do something}) 来获取提供的 IP 地址的 LatLng。输出在“结果”中显示了一组 LatLngs。要访问 LatLng,我使用的是 results[i].geometry.location。 我的问题是为什么输出包含单个 IP 地址的多个 LatLng 值,它们是什么意思?这些 LatLng 值之间似乎存在很大差异(地图上的距离)。

【问题讨论】:

  • 谁告诉你可以使用 geocode-service 来定位 IP?
  • 我认为它可以正常工作,直到我检查了与 IP 地址匹配的位置地址。我多么愚蠢地忽略了这一点。我可以在 Google 地图中使用任何其他 API 来获取 IP 地址的地址吗?
  • 我基本上需要IP地址对应的LatLng。
  • 如果您使用没有 GPS 的设备,例如 PC,您可以使用 HTML5 Geolocation dev.w3.org/geo/api/spec-source.html#geolocation_interface。使用 IP 地址的问题在于其准确性。在我的情况下,该位置在 7 英里之外。
  • 我有一组 IP 地址,我想计算(通过 PC)LatLng。我相信 HTML5 Geolocation 只提供连接设备的位置,而不是任何 IP。

标签: google-maps google-maps-api-3 geolocation ip-geolocation


【解决方案1】:

很遗憾,Google 不提供使用 IP 地址的公共地理编码 API。

请参阅此related question and answers 以获得一些指示。

【讨论】:

    猜你喜欢
    • 2011-04-25
    • 1970-01-01
    • 1970-01-01
    • 2013-10-05
    • 1970-01-01
    • 1970-01-01
    • 2012-08-09
    • 2013-06-27
    • 1970-01-01
    相关资源
    最近更新 更多