Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 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
Default
"Get Directions" code for mobile?
Share on: 
fb share twitter share gplus share more share

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.)
AllenK is offline  
Unread 12th Nov 2011, 06:06 PM   #2
Mobile Website Designer
War Room Member
 
Adrian John's Avatar
 
Join Date: 2009
Posts: 529
Thanks: 611
Thanked 119 Times in 95 Posts
Default
Re: "Get Directions" code for mobile?
Share on: 
fb share twitter share gplus share more share

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
Also, just bellow the link for directions(the end of the video) it's the embed code which can be customized easily to fit your needs.

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
Adrian John is offline  
The Following 2 Users Say Thank You to Adrian John For This Useful Post:
Unread 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
Default
Re: "Get Directions" code for mobile?
Share on: 
fb share twitter share gplus share more share

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.)
AllenK is offline  
Unread 12th Nov 2011, 07:41 PM   #4
Digital Marketer
War Room Member
 
WillR's Avatar
 
Join Date: 2010
Location: Australia
Posts: 12,475
Thanks: 1,984
Thanked 8,187 Times in 4,079 Posts
Default
Re: "Get Directions" code for mobile?
Share on: 
fb share twitter share gplus share more share

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>

WillR is offline  
The Following 5 Users Say Thank You to WillR For This Useful Post:
Unread 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
Default
Re: "Get Directions" code for mobile?
Share on: 
fb share twitter share gplus share more share

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.
AllenK is offline  
Unread 12th Nov 2011, 10:19 PM   #6
Digital Marketer
War Room Member
 
WillR's Avatar
 
Join Date: 2010
Location: Australia
Posts: 12,475
Thanks: 1,984
Thanked 8,187 Times in 4,079 Posts
Default
Re: "Get Directions" code for mobile?
Share on: 
fb share twitter share gplus share more share

Originally Posted by AllenK View Post

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.
You can do that but I am pretty sure it would use javascript. For those who don't have javascript it then means they have to delete that text before they can enter their address. I've also been to forms that had pre-populated fields on a javascript enabled phone and had the same issue where I had to delete what was in the box before I could type my text in it.

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.

WillR is offline  
Unread 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
Default
Re: "Get Directions" code for mobile?
Share on: 
fb share twitter share gplus share more share

Yeap. Makes sense. The simpler, the better.
AllenK is offline  
Unread 7th Jun 2012, 11:58 PM   #8
Advanced Warrior
 
Join Date: 2008
Posts: 945
Thanks: 4
Thanked 24 Times in 24 Posts
Default
Re: "Get Directions" code for mobile?
Share on: 
fb share twitter share gplus share more share

Originally Posted by WillR View Post

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>
This code no longer seems to work. It's giving me an error when I implement on the site and hit "get directions" button. Did Google change the url recently of the "http://maps.google.com/m/directions"? Any input on this?

mrtrance is offline  
Unread 13th Jun 2012, 05:47 PM   #9
MobileWebRockstar
War Room Member
 
lint631's Avatar
 
Join Date: 2011
Location: New York
Posts: 253
Thanks: 41
Thanked 52 Times in 37 Posts
Default
Re: "Get Directions" code for mobile?
Share on: 
fb share twitter share gplus share more share

Did you try it on a smartphone? It doesn't work on my computer but works on my iPhone.

lint631 is offline  
Unread 14th Jun 2012, 05:33 AM   #10
Advanced Warrior
 
Join Date: 2008
Posts: 945
Thanks: 4
Thanked 24 Times in 24 Posts
Default
Re: "Get Directions" code for mobile?
Share on: 
fb share twitter share gplus share more share

Originally Posted by lint631 View Post

Did you try it on a smartphone? It doesn't work on my computer but works on my iPhone.
Doesn't work on my Android phone. Gives me a Google error message.

mrtrance is offline  
Unread 20th Jun 2012, 07:12 AM   #11
Digital Marketer
War Room Member
 
WillR's Avatar
 
Join Date: 2010
Location: Australia
Posts: 12,475
Thanks: 1,984
Thanked 8,187 Times in 4,079 Posts
Default
Re: "Get Directions" code for mobile?
Share on: 
fb share twitter share gplus share more share

Yes, Google have mucked around with things since this code was written. It isn't working anymore.

WillR is offline  
Unread 21st Jun 2012, 04:52 AM   #12
John Burnette
War Room Member
 
globalpro's Avatar
 
Join Date: 2007
Location: S.E. USA
Posts: 1,170
Thanks: 984
Thanked 270 Times in 223 Posts
Default
Re: "Get Directions" code for mobile?
Share on: 
fb share twitter share gplus share more share

Originally Posted by WillR View Post

Yes, Google have mucked around with things since this code was written. It isn't working anymore.
Will,

Is there a fix for this? I am using your templates and the map and directions is standard option for clients.

Thanks,

John
globalpro is offline  
Unread 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
Default
Re: "Get Directions" code for mobile?
Share on: 
fb share twitter share gplus share more share

Originally Posted by globalpro View Post

Will,

Is there a fix for this? I am using your templates and the map and directions is standard option for clients.

Thanks,

John
A way to get this to work is by using Bing Directions instead of Google's. Bing Directions work just as well. Details in this thread:

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

JohnE is offline  
The Following User Says Thank You to JohnE For This Useful Post:
Unread 25th Jun 2012, 03:04 AM   #14
Warrior Member
 
Join Date: 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: "Get Directions" code for mobile?
Share on: 
fb share twitter share gplus share more share

Did you try it on a SMARTPHONE?
It does not work on my computer but works on my iPhone.

austarsolar is offline  
Unread 25th Jun 2012, 06:56 AM   #15
I Do Voice Over Work
War Room Member
 
rlhurst's Avatar
 
Join Date: 2011
Location: Oregon
Posts: 581
Thanks: 34
Thanked 129 Times in 96 Posts
Default
Re: "Get Directions" code for mobile?
Share on: 
fb share twitter share gplus share more share

Still works on my iPhone, but does NOT work on my Droid Charge.

I do voice over work... here's a SAMPLE
rlhurst is offline  
Unread 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
Default
Re: "Get Directions" code for mobile?
Share on: 
fb share twitter share gplus share more share

Nice video.

Can the page with the directions open in the same window?

Originally Posted by Adrian John View Post

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
Also, just bellow the link for directions(the end of the video) it's the embed code which can be customized easily to fit your needs.

Hope it helps.

Adrian
DABK is offline  
Unread 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
Default
Re: "Get Directions" code for mobile?
Share on: 
fb share twitter share gplus share more share

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/
DexterGallagher is offline  
Unread 16th Sep 2013, 02:35 PM   #18
Warrior Member
War Room Member
 
SocialLooks's Avatar
 
Join Date: 2013
Location: Tampa Florida
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: "Get Directions" code for mobile?
Share on: 
fb share twitter share gplus share more share

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
SocialLooks is offline  
Closed Thread


Bookmarks

Tags
code, get directions, mobile


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 10:26 PM.