12th Nov 2011, 04:14 PM | #1 |
Warrior Member Join Date: 2010 Location: www.OfferWriter.com
Posts: 27
Thanks: 20
Thanked 5 Times in 4 Posts
|
Can someone advice on the code to add "Get Directions" function to the Location page on a mobi site? Currently I have just Google Map plugin there showing the map. I'd like to add "Get Direction" entry field (with the words "Enter starting location") and a button. So that the users type in starting location, press a button and get Google from-to directions (Google) all filled in for them. Thanks a bunch! . |
WP Mobile Pro review -- Build well-designed Mobile sites in minutes, simply in Wordpress. (A pro-tool for professional Offline-consultants.) | |
12th Nov 2011, 06:06 PM | #2 |
Mobile Website Designer War Room Member Join Date: 2009
Posts: 529
Thanks: 611
Thanked 119 Times in 95 Posts
|
What i am doing is have people Click(Tap) on the Image of the Map and the link should go straight to Google directions page. You can get the link straight to direction by going to exact Google places listing of your client, click Directions and up on the right you will find the link. Here's a short video i just made to explain how i do it.Watch it Full Screen for better view. Code: http://screencast.com/t/RIhA3EmnKfi Hope it helps. Adrian |
ARE YOU A CONSULTANT? Do you have clients who could use MORE LEADS? Get them a MOBILE WEBSITE PLATFORM built to stay up with their clients habits. More than 50% of their customers buys from their mobile devices now! CLICK HERE FOR MORE INFO | |
The Following 2 Users Say Thank You to Adrian John For This Useful Post: |
12th Nov 2011, 07:17 PM | #3 |
Warrior Member Join Date: 2010 Location: www.OfferWriter.com
Posts: 27
Thanks: 20
Thanked 5 Times in 4 Posts
|
Thanks for the video Adrian. I tried your setup. For me it returns a map. I want a direction finder dialog box. But you gave me an idea for a hack though: 1. Make a "Get Directions" button 2. Go to http:// maps.google.com/m/directions 3. Enter the destination address and hit 'Search'. Google returns a URL 4. Hook up that URL to the button. This way user gets a direction finder dialog with a filled in destination. Ugly but it works. That page is a bit screwy. though. It's ironic, how with all it's "mobile push", Google's own mobile page formats poorly on a mobile. . |
WP Mobile Pro review -- Build well-designed Mobile sites in minutes, simply in Wordpress. (A pro-tool for professional Offline-consultants.) | |
12th Nov 2011, 07:41 PM | #4 |
Digital Marketer War Room Member Join Date: 2010 Location: Australia
Posts: 12,475
Thanks: 1,984
Thanked 8,187 Times in 4,079 Posts
|
This is the code you will need to make it work. This form will allow people to enter their location and get directions to 123 Story St Brooklyn, NY 11218. Obviously you would just change that address to whatever destination address you need. <form method="get" action="http://maps.google.com/m/directions"> <fieldset> <input type="hidden" name="daddr" value="123 Story St Brooklyn, NY 11218" /> <label>Enter Starting Location:</label> <input name="saddr" type="text" class="input" /> <input type="submit" name="submit" class="button" value="Get Directions" /> </fieldset> </form> |
| |
The Following 5 Users Say Thank You to WillR For This Useful Post: |
12th Nov 2011, 08:10 PM | #5 |
Warrior Member Join Date: 2010 Location: www.OfferWriter.com
Posts: 27
Thanks: 20
Thanked 5 Times in 4 Posts
|
Will saves the day (again)! That's a killer trick. Btw, is it possible to put (pre-polulate) "Enter Starting Location" into the search box itself? Thank you. |
12th Nov 2011, 10:19 PM | #6 | |
Digital Marketer War Room Member Join Date: 2010 Location: Australia
Posts: 12,475
Thanks: 1,984
Thanked 8,187 Times in 4,079 Posts
|
I think the better user experience for mobile phones is probably to have the field label above or next to the text box like in the example above... and leave the text box completely empty. That's just my personal preference though. | |
| ||
12th Nov 2011, 11:14 PM | #7 |
Warrior Member Join Date: 2010 Location: www.OfferWriter.com
Posts: 27
Thanks: 20
Thanked 5 Times in 4 Posts
|
Yeap. Makes sense. The simpler, the better.
|
7th Jun 2012, 11:58 PM | #8 | |
Advanced Warrior Join Date: 2008
Posts: 945
Thanks: 4
Thanked 24 Times in 24 Posts
|
| |
| ||
13th Jun 2012, 05:47 PM | #9 |
MobileWebRockstar War Room Member Join Date: 2011 Location: New York
Posts: 253
Thanks: 41
Thanked 52 Times in 37 Posts
|
Did you try it on a smartphone? It doesn't work on my computer but works on my iPhone.
|
| |
14th Jun 2012, 05:33 AM | #10 |
Advanced Warrior Join Date: 2008
Posts: 945
Thanks: 4
Thanked 24 Times in 24 Posts
| |
| |
20th Jun 2012, 07:12 AM | #11 |
Digital Marketer War Room Member Join Date: 2010 Location: Australia
Posts: 12,475
Thanks: 1,984
Thanked 8,187 Times in 4,079 Posts
|
Yes, Google have mucked around with things since this code was written. It isn't working anymore.
|
| |
21st Jun 2012, 04:52 AM | #12 |
John Burnette War Room Member Join Date: 2007 Location: S.E. USA
Posts: 1,170
Thanks: 984
Thanked 270 Times in 223 Posts
| |
21st Jun 2012, 11:10 AM | #13 | |
HyperActive Warrior Join Date: 2008 Location: Toronto, ON
Posts: 108
Thanks: 11
Thanked 14 Times in 13 Posts
|
http://www.warriorforum.com/mobile-m...ns-mobile.html Until Google decides to fully reinstate its service, there's nothing anybody can do about it. John | |
| ||
The Following User Says Thank You to JohnE For This Useful Post: |
25th Jun 2012, 03:04 AM | #14 |
Warrior Member Join Date: 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
| Did you try it on a SMARTPHONE? It does not work on my computer but works on my iPhone. |
| |
9th Sep 2013, 05:05 AM | #16 | |
VIP Warrior War Room Member Join Date: 2010
Posts: 7,309
Thanks: 2,841
Thanked 3,742 Times in 2,488 Posts
|
Nice video. Can the page with the directions open in the same window?
| |
9th Sep 2013, 05:11 AM | #17 |
Advanced Warrior Join Date: 2012 Location: Living in Cambridge UK for 2-3 years.
Posts: 645
Thanks: 78
Thanked 143 Times in 103 Posts
|
Using JM, you have no issues it works every time - why the confusion? Are people coding their own sites?
|
We offer mobile optimized websites at http://mobilewebsitecreationltd.co.uk/ | |
16th Sep 2013, 02:35 PM | #18 |
Warrior Member War Room Member Join Date: 2013 Location: Tampa Florida
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
We are InstantMobi.com. We offer VERY easily sold services which offer two essential elements: 1) High value commissions to you and 2) High quality product for the purchaser. Our commissions stay with you for the life of the customer - we don't have cancellations! |
Ryan McCrory SocialLooks.com MambaSEO.com.au | |
Bookmarks |
Tags |
code, get directions, mobile |
| |