问题
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