在Google Maps URL中查找纬度/经度坐标
如果您想要萨克拉曼多的Woodside Lane 2202的坐标
If you wanted the coordinates for 2202 Woodside Lane in Sacramento
您可以在@符号后立即从网址中抽出坐标吗? 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.
地图的版本向左移动
标记的坐标位于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
"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