如何将地址转换为 Google 地图链接(非地图) [英] How to convert an address into a Google Maps Link (NOT MAP)

查看:31
本文介绍了如何将地址转换为 Google 地图链接(非地图)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在网上搜索(谷歌搜索)一段时间后,我找不到任何需要以下地址的内容:

After looking (Googling) on the web for a while, I can find nothing that takes an address like:

宾夕法尼亚大道东南1200号,华盛顿哥伦比亚特区,20003 年

并将其转换为可点击的链接:

and converts it into a clickable link:

http://maps.google.com/maps?f=q&source=s_q&hl=en&q=1200+Pennsylvania+Ave+SE,+Washington,+District+of+Columbia,+20003&sll=37.0625,-95.677068&sspn=44.118686,114.169922&ie=UTF8&cd=1&split;geocode&sll=37.0625,-95.677068&sspn=44.118686,114.169922&ie=UTF8&cd=1&split;geocode&80625&sll=lFT57MU0d.,-76.99017&spn=0.01064,0.027874&z=16&iwloc=A

首选 jQuery 或 PHP,或者只是任何关于此的有用信息.

jQuery or PHP preferred or just any useful information on this.

推荐答案

这个怎么样?

https://maps.google.com/?q=1200 Pennsylvania Ave SE,华盛顿哥伦比亚特区,20003 年

https://maps.google.com/?q=term

如果您有经纬度,请使用以下网址

If you have lat-long then use below URL

https://maps.google.com/?ll=latitude,longitude

示例:maps.google.com/?ll=38.882147,-76.99017

更新

截至 2017 年,Google 现在有了创建跨平台 Google 地图网址的官方方法:

As of year 2017, Google now has an official way to create cross-platform Google Maps URLs:

https://developers.google.com/maps/documentation/urls/guide

你可以使用像

https://www.google.com/maps/search/?api=1&query=1200%20Pennsylvania%20Ave%20SE%2C%20Washington%2C%20District%20of%20Columbia%2C%2020003 

这篇关于如何将地址转换为 Google 地图链接(非地图)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆