Link to Google Maps

十年热恋 提交于 2019-12-13 10:45:59

问题


I'm developing a website in HTML and I would like to surround a postcode with a link so that when a user clicks on the postcode he is sent to google maps searching that postcode. Any advice how can I do that? Thanks!


回答1:


<a href="https://maps.google.com/maps?q=POSTCODE">POSTCODE</a>

You mean like that?




回答2:


See the Map Images API on Google. It's actually pretty straight forward.

Static Maps API

Add static maps, including terrain or satellite maps, to your web page or application. The Static Maps API supports custom styling, high resolution printing and displays, markers, and geometry.

Read the developer documentation.

<img src="http://maps.googleapis.com/maps/api/staticmap?center=-15.800513,-47.91378&zoom=11&size=200x200&sensor=false">

Dev Documentation is here: https://developers.google.com/maps/documentation/staticmaps/index




回答3:


Just put this type of link with q=postcode :

<a href="https://maps.google.fr/maps?q=YourPostCode" target="_blank">Go on maps </a>

example

<a href="https://maps.google.fr/maps?q=83210" target="_blank">Go on maps </a>

Enjoy



来源:https://stackoverflow.com/questions/17238578/link-to-google-maps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!