Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Mobile Marketing (https://www.warriorforum.com/mobile-marketing/)
-   -   "Get Directions" code for mobile? (https://www.warriorforum.com/mobile-marketing/485838-get-directions-code-mobile.html)

AllenK 12th November 2011 04:14 PM

"Get Directions" code for mobile?
 
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!



.

Adrian John 12th November 2011 06:06 PM

Re: "Get Directions" code for mobile?
 
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

AllenK 12th November 2011 07:17 PM

Re: "Get Directions" code for mobile?
 
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.



.

WillR 12th November 2011 07:41 PM

Re: "Get Directions" code for mobile?
 
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>

AllenK 12th November 2011 08:10 PM

Re: "Get Directions" code for mobile?
 
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.

WillR 12th November 2011 10:19 PM

Re: "Get Directions" code for mobile?
 
Quote:

Originally Posted by AllenK (Post 5041788)
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.

AllenK 12th November 2011 11:14 PM

Re: "Get Directions" code for mobile?
 
Yeap. Makes sense. The simpler, the better.

mrtrance 7th June 2012 11:58 PM

Re: "Get Directions" code for mobile?
 
Quote:

Originally Posted by WillR (Post 5041707)
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?

lint631 13th June 2012 05:47 PM

Re: "Get Directions" code for mobile?
 
Did you try it on a smartphone? It doesn't work on my computer but works on my iPhone.

mrtrance 14th June 2012 05:33 AM

Re: "Get Directions" code for mobile?
 
Quote:

Originally Posted by lint631 (Post 6423984)
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.

WillR 20th June 2012 07:12 AM

Re: "Get Directions" code for mobile?
 
Yes, Google have mucked around with things since this code was written. It isn't working anymore.

globalpro 21st June 2012 04:52 AM

Re: "Get Directions" code for mobile?
 
Quote:

Originally Posted by WillR (Post 6463185)
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

JohnE 21st June 2012 11:10 AM

Re: "Get Directions" code for mobile?
 
Quote:

Originally Posted by globalpro (Post 6469157)
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

austarsolar 25th June 2012 03:04 AM

Re: "Get Directions" code for mobile?
 
Did you try it on a SMARTPHONE?
It does not work on my computer but works on my iPhone.

rlhurst 25th June 2012 06:56 AM

Re: "Get Directions" code for mobile?
 
Still works on my iPhone, but does NOT work on my Droid Charge.

DABK 9th September 2013 05:05 AM

Re: "Get Directions" code for mobile?
 
Nice video.

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

Quote:

Originally Posted by Adrian John (Post 5041373)
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


DexterGallagher 9th September 2013 05:11 AM

Re: "Get Directions" code for mobile?
 
Using JM, you have no issues it works every time - why the confusion? Are people coding their own sites?

SocialLooks 16th September 2013 02:35 PM

Re: "Get Directions" code for mobile?
 
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!


All times are GMT -6. The time now is 08:45 AM.