本文介绍了在Google Maps URL中查找纬度/经度坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您想要萨克拉曼多的Woodside Lane 2202的坐标

If you wanted the coordinates for 2202 Woodside Lane in Sacramento

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

您可以在@符号后立即从网址中抽出坐标吗? 38.579949,-121.4167457

Could you just pluck the coordinates out of the url right after the @ sign? 38.579949,-121.4167457

我尝试了此方法,但是当我将这些坐标重新插入到Google地图中时:

I tried this but when I plugged those coordinates back into google maps:

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:0xx!8m2!3d38. 579949!4d-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

这是一个略有不同的地址.

it's a slightly different address.

推荐答案

这些不是地址的坐标,而是地图的中心.

Those are not the coordinates of the address, they are the center of the map.

地图的版本向左移动

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

The coordinates of the marker are at the end of the 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

这篇关于在Google Maps URL中查找纬度/经度坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 16:37