Friday, January 13, 2006, 9:54 AM // 0 comments

Add Google Maps’ Directions to Your Site

This actually is a blog entry I found on another site: malevolent design weblog. As you'll notice, I modified it slightly.

If you have a business which gets visitors to its premises you’ve probably created some kind of map yourself and maybe tried to write some generalised directions, but it can be tricky to get right. Using a simple form on your site you can also offer users a personalised map and directions courtesy of Google Maps. Just modify the appropriate code snippet below to include the destination and any extra formatting markup needed.

(Developer Bonus: Google has now released the Google Maps API for embedding maps and adding your own data.)

<form action="" method="get">
<p><label for="saddr">Your ZIP code</label>
<input type="text" name="saddr" id="saddr" value="" />
<input type="submit" value="Go" />
<input type="hidden" name="daddr" value="[destination]" />
<input type="hidden" name="hl" value="en" /></p>

Example: Directions to Mont-Tremblant, QC, Canada



Post a Comment

<< Home

About Paul Altobelli

Paul Altobelli is a veteran Internet, marketing and technology professional with considerable expertise in search engine marketing, web site development, design, implementation and project management. [more]

Flickr Photos