在网上搜索了一段时间后,我找不到任何像这样的地址:

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

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

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&geocode=FT5MUQIdIDlp-w&split=0&ll=38.882147,-76.99017&spn=0.01064,0.027874&z=16&iwloc=A

jQuery或PHP是首选或者任何有用的信息。


当前回答

这是我从谷歌地图的一篇文章中发现的:

Open Google Maps. Make sure the map or Street View image you'd like to embed shows up on the map. In the top left corner, click the main menu ​☰. Click Share or embed map. At the top of the box that appears, choose the Embed map tab. Choose the size you want, then copy the code and paste it into the source code of your website or blog. Note: If you're using Maps in Lite mode, you won't be able to embed a map. Keep in mind that traffic information and some other Maps info might not be available in the embedded map.

其他回答

这个怎么样?

https://maps.google.com/?q=1200宾夕法尼亚大道,华盛顿,哥伦比亚特区,20003

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

如果你有latong然后使用下面的URL

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

例子:maps.google.com/ ?噢= 38.882147,-76.99017

更新

截至2017年,谷歌现在有一个官方创建跨平台谷歌地图url的方式:

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 

最好的方法是这样说:

var mapUrl = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=16900+North+Bay+Road,+Sunny+Isles+Beach,+FL+33160&aq=0&sll=37.0625,-95.677068&sspn=61.282355,146.513672&ie=UTF8&hq=&hnear=16900+North+Bay+Road,+Sunny+Isles+Beach,+FL+33160&spn=0.01628,0.025663&z=14&iwloc=A&output=embed"

记得在必要时替换第一和第二个地址。

你可以看看工作样本

在http://www.labnol.org/internet/tools/short-urls-for-google-maps/6604/上,他们显示了一个简短的URL,工作得很好

地图url是相当笨拙的,特别是在发送即时消息,推特或电子邮件时。MapOf。它为您提供了一个快速的方法来链接到谷歌地图,只需指定位置的地址作为搜索参数。

http://mapof.it/

我在自己设计的几个应用程序中使用了它,效果非常好。

那么这个呢: http://support.google.com/maps/bin/answer.py?hl=en&answer=72644

这是我从谷歌地图的一篇文章中发现的:

Open Google Maps. Make sure the map or Street View image you'd like to embed shows up on the map. In the top left corner, click the main menu ​☰. Click Share or embed map. At the top of the box that appears, choose the Embed map tab. Choose the size you want, then copy the code and paste it into the source code of your website or blog. Note: If you're using Maps in Lite mode, you won't be able to embed a map. Keep in mind that traffic information and some other Maps info might not be available in the embedded map.