【问题标题】:Finding the lat/long coordinates in a Google Maps URL在 Google 地图 URL 中查找纬度/经度坐标
【发布时间】:2017-01-18 15:01:26
【问题描述】:

如果您想要萨克拉门托伍德赛德巷 2202 号的坐标

https://www.google.com/maps/place/2202+Woodside+Ln,+Sacramento,+CA+95825/@38.579949,-121.4167457,17z/data=!3m1!4b1!4m5!3m4!1s0x809ada5b2c7434a5:0x3f579f08dfa5bf06!8m2!3d38.579949!4d-121.414557

你能在@符号之后从网址中提取坐标吗? 38.579949,-121.4167457

我试过了,但是当我将这些坐标重新插入谷歌地图时:

https://www.google.com/maps/place/38%C2%B034'47.8%22N+121%C2%B025'00.3%22W/@38.579949,-121.4189397,17z/data=!3m1!4b1!4m5!3m4!1s0x0:0x0!8m2!3d38.579949! 4d-121.4167457

地址略有不同。

【问题讨论】:

    标签: google-maps


    【解决方案1】:

    那些不是地址的坐标,它们是地图的中心。

    地图向左移动的版本:

    https://www.google.com/maps/place/2202+Woodside+Ln,+Sacramento,+CA+95825/@38.5800077,-121.412261,17z/data=!4m5!3m4!1s0x809ada5b2c7434a5:0x3f579f08dfa5bf06!8m2!3d38.579949!4d-121.414557

    标记的坐标在 URL 的末尾:!8m2!3d38.579949!4d-121.414557 => 38.579949,-121.414557

    Google Geocoding API 返回:

    "location" : {
       "lat" : 38.579949,
       "lng" : -121.414557
    },
    "location_type" : "ROOFTOP"
    

    对于这个请求: https://maps.googleapis.com/maps/api/geocode/json?address=2202+Woodside+Ln,+Sacramento,+CA+95825

    【讨论】:

      猜你喜欢
      • 2013-02-23
      • 2011-10-31
      • 1970-01-01
      • 2018-08-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-09
      • 2010-11-08
      相关资源
      最近更新 更多