I have noticed how innacurate WSN links is when it comes to UK Google maps. This is not a fault of yours Paul, it is simply that the Royal mail has copyright over geo information for UK Postcodes, and although Google has purchased a license for their own use, it is not allowed to pass on the information, even when people use the Maps API.
I get round this by geocoding every single link by hand (getting long and lat info from another source) but it is not ideal.
I beleive it would be more accurate for the UK if geocoding was just based on Postcode and not first line of address.
It also seems that Microsoft's Virtual Earth does a far better job when it comes to geocoing Postcodes, as does Yahoo maps. Google seems to be far less accurate for the UK.
Would it be possible to have Microsoft's Virtual Earth maps as an alternative to Google maps? Or maybe Yahoo maps? Or have the script query Microsoft's Virtual Earth for the long and lat coordinates that Goggle maps use?
Are you sure the yahoo or virtual earth APIs are any better? As I recall, google does it accurately in their maps too but isn't allowed to let it be done accurately through their free API.
I can certainly add a tweak to use yahoo geocoding. I can't find any information on virtual earth's API at the moment.
At the above URL, you enter a postcode and it returns long and lat.
I think it wouldbe ideal if we could have a button on the submit form that places long ant lat coordinates into the submit form before it is submitted, so that the person submitting can view the long and lat coordinates before submitting and check it if they know their own long and lat. The button could work in a similar way to the button on the link above. Similar to the way the "get meta description" button fills in the form.
I think doing this will allow more accurate long and lat for everyone.
A postcode isn't useful for geocoding for a map, surely, since it'd put all the pins in the entire postcode in the same place.
I plugged in the old code WSN used to use for yahoo geocoding, which uses an application key I included, no need for any other keys. It works correctly for me, screenshot of a UK listing input after setting $geocodemethod = 'yahoo'; is attached.
Paul wrote: A postcode isn't useful for geocoding for a map, surely, since it'd put all the pins in the entire postcode in the same place.
I take your point, but, in the UK there are hundreds of thousands of Postcodes and each postcode covers maybe 5 to 15 houses. So to Geocode by Postcode is quite accurate, as long as the whole postcode is used.
I can't input that the way you put it, because WSN only has street/county/zip/country, there's nowhere to put the three different things you have in the middle there. What exactly are you typing into which boxes?
I see the spaces in your postal codes require URL encoding, which was present for google but not yahoo. Added that and it works. Included the change in beta 4.
0/5
1
2
3
4
5
Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.
Comments on UK Google Maps
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
I have noticed how innacurate WSN links is when it comes to UK Google maps. This is not a fault of yours Paul, it is simply that the Royal mail has copyright over geo information for UK Postcodes, and although Google has purchased a license for their own use, it is not allowed to pass on the information, even when people use the Maps API.
I get round this by geocoding every single link by hand (getting long and lat info from another source) but it is not ideal.
I beleive it would be more accurate for the UK if geocoding was just based on Postcode and not first line of address.
It also seems that Microsoft's Virtual Earth does a far better job when it comes to geocoing Postcodes, as does Yahoo maps. Google seems to be far less accurate for the UK.
Would it be possible to have Microsoft's Virtual Earth maps as an alternative to Google maps? Or maybe Yahoo maps? Or have the script query Microsoft's Virtual Earth for the long and lat coordinates that Goggle maps use?
Thanks
Jon
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Are you sure the yahoo or virtual earth APIs are any better? As I recall, google does it accurately in their maps too but isn't allowed to let it be done accurately through their free API.
I can certainly add a tweak to use yahoo geocoding. I can't find any information on virtual earth's API at the moment.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
A $geocodemethod = 'yahoo'; tweak should do yahoo in 5.1.15 beta 4.
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
Doesn't seem to work Paul. Lang and Lat both have been 0 on all listings since adding that. Wouldn't we need to specify an API key?
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
For some reason, Yahoo and particularly MS maps are are in most cases far more accurate for the UK.
You can find info on the MS API here http://www.microsoft.com/maps/developers/
The website I use to get the long and lat coordinates uses MS api, it is located at...
www.websemantics.co.uk/reso...ordinates_conversion_tool/
At the above URL, you enter a postcode and it returns long and lat.
I think it wouldbe ideal if we could have a button on the submit form that places long ant lat coordinates into the submit form before it is submitted, so that the person submitting can view the long and lat coordinates before submitting and check it if they know their own long and lat. The button could work in a similar way to the button on the link above. Similar to the way the "get meta description" button fills in the form.
I think doing this will allow more accurate long and lat for everyone.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
A postcode isn't useful for geocoding for a map, surely, since it'd put all the pins in the entire postcode in the same place.
I plugged in the old code WSN used to use for yahoo geocoding, which uses an application key I included, no need for any other keys. It works correctly for me, screenshot of a UK listing input after setting $geocodemethod = 'yahoo'; is attached.
Trying a UK address directly:
local.yahooapis.com/MapsSer...=United+Kingdom&output=php
The response is which also looks right to me.
Attached Files:
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
A postcode isn't useful for geocoding for a map, surely, since it'd put all the pins in the entire postcode in the same place.
I take your point, but, in the UK there are hundreds of thousands of Postcodes and each postcode covers maybe 5 to 15 houses. So to Geocode by Postcode is quite accurate, as long as the whole postcode is used.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Can you give me a specific example of a UK address that doesn't work through yahoo? Maybe it's when you include a state (county?) that it doesn't?
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
It doesn't work for any Uk addres at all. As one example...
87 Yelland Road
Fremington
Barnstaple
Devon
EX31 3DT
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
It doesn't work for any Uk addres at all.
I gave an example above of a UK address it does work for.
As one example...
87 Yelland Road
Fremington
Barnstaple
Devon
EX31 3DT
I can't input that the way you put it, because WSN only has street/county/zip/country, there's nowhere to put the three different things you have in the middle there. What exactly are you typing into which boxes?
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
So it would be...
87 Yelland Road {LINKADDRESS}
Barnstaple {LINKCITY}
Devon {LINKSTATE}
EX31 3DT {LINKZIP}
Can you think of any reason why when I do this I always get 0 for both long and lat?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I see the spaces in your postal codes require URL encoding, which was present for google but not yahoo. Added that and it works. Included the change in beta 4.