Created
November 14, 2013 04:30
-
-
Save carlos-sanchez/7461377 to your computer and use it in GitHub Desktop.
Get Directions on Google Maps. Simple yet powerful code to create a form where the user can enter his location to get directions to a specific place. Very useful for contact pages.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="http://maps.google.com/maps" method="get" target="_blank"> | |
<label for="saddr">Enter your location</label> | |
<input type="text" name="saddr" /> | |
<input type="hidden" name="daddr" value="350 5th Ave New York, NY 10018 (Empire State Building)" /> | |
<input type="submit" value="Get directions" /> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment