PHP-GTK2 Cookbook Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Get Directions UK Post Code Search (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Get Directions UK Post Code Search


#2487
chriscundy (User)
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Get Directions UK Post Code Search 4 Years, 11 Months ago Karma: 0  
Hi,

I have a client who needs to use the Get Directions plugin on his UK website and when entering the from details it needs to work by just entering the full uk postal code without putting United Kingdom as the country afterwards as most people would not write this.

Is this possible?

Thanks
 
  The administrator has disabled public write access.

#2488
kksou (Admin)
Admin
Posts: 1715
graph
User Online Now Click here to see the profile of this user
Re:Get Directions UK Post Code Search 4 Years, 11 Months ago Karma: 27  
Hi,

Yes, from user's point of view, they shouldn't have to put UK after every address.

I will improve on the plugin so that you can specify a default country that will be automatically appended to the address input by user.

Give me a couple of days. Will let you know when it's done.

If you're in a hurry, you can hardcode this manually in the program.

Go to the folder: plugins/content/googleDirections

Edit the file: googleDirections.lib.php

In line 42, you will see:
$this->from = $this->fix_str3($this->from);

All you need is to add one more line after this:
$this->from .= " ,United Kingdom";

Regards,
/kksou
 
 
Last Edit: 2009/08/09 11:42 By kksou.
  The administrator has disabled public write access.

#2493
chriscundy (User)
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Re:Get Directions UK Post Code Search 4 Years, 11 Months ago Karma: 0  
OK Look forward to it :)

I tried the hardcode edit like you mentioned but this did not work.
 
  The administrator has disabled public write access.
#2498
kksou (Admin)
Admin
Posts: 1715
graph
User Online Now Click here to see the profile of this user
Re:Get Directions UK Post Code Search 4 Years, 11 Months ago Karma: 27  
 
  The administrator has disabled public write access.
#2514
chriscundy (User)
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Re:Get Directions UK Post Code Search 4 Years, 11 Months ago Karma: 0  
OK Thanks

There still seems to be a bit of an issue. If I type in the village im coming from that seems to work but it does not seem to accept UK postal codes.

If i type my postcode bs494jb in it says:

"Google cannot find the address you specified.
Please double check your address."

this needs to work.

also is it possible by pressing enter on the coming from field that it will trigger the get directions command??

Thanks :)
 
 
Last Edit: 2009/08/20 22:50 By chriscundy. Reason: more info
  The administrator has disabled public write access.
#2515
kksou (Admin)
Admin
Posts: 1715
graph
User Online Now Click here to see the profile of this user
Re:Get Directions UK Post Code Search 4 Years, 11 Months ago Karma: 27  
Hi,

Please go to:
http://kksou.com/t1510/index.php?option=com_content&view=article&id=71&catid=35&Itemid=55

I input: "bs494jb"
Click: "Get Directions"

And the directions are displayed.

Would you want to try one more time and let me know if it works.

Regards,
/kksou
 
  The administrator has disabled public write access.
#2828
philby (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Re:Get Directions UK Post Code Search 4 Years, 9 Months ago Karma: 0  
Hello,

Returning to this topic (I have just installed directions-to, and very good it is too).

It appears that only the first 5 characters of the UK post code are recognised, as demonstrated by your test page. If a 7 character post code is entered, the "from" label only reports back the first 5. This equates to the centre of a very large area. I guess it is just a string length problem, or maybe you are expecting just alphas followed by numeric?

Anyway, it would be nice to fix this minor issue.

Thanks

Phil
 
  The administrator has disabled public write access.
#2845
kksou (Admin)
Admin
Posts: 1715
graph
User Online Now Click here to see the profile of this user
Re:Get Directions UK Post Code Search 4 Years, 9 Months ago Karma: 27  
Hi Phil,

If you look at the source code, I did not grab only the first 5 characters. I pumped whatever you've input there through the google maps API. So I think it's the google maps API that accepts only the first 5 characters for the UK post code.

I did a quick search on the Internet.

Seems like this is the case:
http://www.google.com/support/forum/p/Google+Mobile/thread?tid=4020341c21642a3b&hl=en

Regards,
/kksou
 
 
Last Edit: 2009/10/25 00:56 By kksou.
  The administrator has disabled public write access.
#2862
philby (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Re:Get Directions UK Post Code Search 4 Years, 9 Months ago Karma: 0  
Hi kksou,

I think you are correct - sorry for doubting you!

Tried the postcode in googlemaps and it worked, so tried again in your directions-to and guess what? it also worked!

Reckon the guys at google have realised the bug and fixed it recently.

All good now - thanks for the help, keep up the good work, appreciate it.

Phil
 
  The administrator has disabled public write access.



Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Blog - Forum - Privacy Policy - Contact Us
Copyright © 2006-2012. kksou.com. All Rights Reserved