Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
59
rated 0 times [  60] [ 1]  / answers: 1 / hits: 117709  / 10 Years ago, thu, december 11, 2014, 12:00:00

What is the url structure to search for an address in Google Maps?


I want to offer an address on my website that, when clicked, it will open google maps directly to an address from my script.


I want to create a link <a href="..."></a> which will open a Google Maps browser page that shows a map of a street address from my script.


More From » html

 Answers
44

You can do it like this:



this is your href: http://maps.google.com/?q=
everything that goes after q will be filled in the search filled and submitted, for example:
1200 Pennsylvania Ave SE, Washington, District of Columbia, 20003



So the link looks like this: <a href=http://maps.google.com/?q=1200 Pennsylvania Ave SE, Washington, District of Columbia, 20003>...</a>



If you need the q to be dynamic you can do it with simple jQuery code to update your href.


[#68515] Tuesday, December 9, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kourtney

Total Points: 368
Total Questions: 103
Total Answers: 85

Location: Bonaire
Member since Sat, May 1, 2021
3 Years ago
kourtney questions
Sun, Oct 4, 20, 00:00, 4 Years ago
Tue, Oct 29, 19, 00:00, 5 Years ago
Thu, Apr 4, 19, 00:00, 5 Years ago
Fri, Mar 1, 19, 00:00, 5 Years ago
;