How to put google map directions into your web page/site

General software, Operating Systems, and Programming discussion.
Everything from software questions, OSes, simple HTML to scripting languages, Perl, PHP, Python, MySQL, VB, C++ etc.
Post Reply
User avatar
David
SG Elite
Posts: 9393
Joined: Sun Feb 20, 2000 12:00 pm
Location: Nova Caesarea

How to put google map directions into your web page/site

Post by David »

I noticed this in another doctor's web site and thought it a handy little addition.

<form action="http://maps.google.com/maps" method="get" target="_blank">
Enter your starting address:
<input type="text" name="saddr" />
<input type="hidden" name="daddr" value="1 Main St. Anytown NY" />
<input type="submit" value="get directions" />
</form>

Replace... 1 Main St. Anytown NY with your destination.

Special thanks to Dave Taylor and Dr. Gnoy.

Hell_Yes

Luck is where preparation meets opportunity - Seneca

"Anti-intellectualism has been a constant thread winding its way through our political and cultural life, nurtured by the false notion that democracy means that 'my ignorance is just as good as your knowledge.'" - Isaac Asimov

It is my ambition to say in ten sentences what others say in a whole book. - Friedrich Nietzsche
User avatar
stevebakh
Posts: 3228
Joined: Wed Aug 07, 2002 12:00 pm

Post by stevebakh »

If you want to take it a step further, you can integrate google maps with your website. You can have the map on your "contact us" page, for example, and allow visitors to enter their postcode and just update the map that's already on the page. It avoids sendnig your visitors away from your website (or opening a new window or tab, like that form example does).
Post Reply