> I'm pretty sure Google offers a geocoding API that supports UK addresses somewhere. You wouldn't use Google Maps.
the only thing that does uk postcodes to location of any kind that i know of (that doesn't cost a lot of money) is maps.google.com/.co.uk. uk postcodes are is expensive copyright protected info generally. that's why i thought that was the thing to use.
the maps.google.com web page allows you to type in for example L71 2LB to L72 3LB and it replies:
Driving directions to Liverpool, Merseyside L72, UK
7.2 mi – about 25 mins
Liverpool L71 2LB
UK
1. Head southwest on Royal Mail St toward Hawke St - 246 ft
2. Turn right at Hawke St - 249 ft
3. Turn right at Copperas Hill ....
if it's not possible to get that info somehow i'm skuppered i think. the above miles by road distance from postcodes would be fantastic, but straight line info would be good -- anything would be better than nothing. as you say if i could get the long+lat data all would be fine but the only thing i know of that provides info like that is the maps.google page
oh dear
it really didn't occur to me that the whole google maps thing wasn't a server side thing at all, but all javascript from the user's browser. silly me.
there are things which look vaguely helpful in the javascript google maps api documentation, eg http://code.google.com/apis/maps/doc.../services.html
Code:
// Create a directions object and register a map and DIV to hold the
// resulting computed directions
var map;
var directionsPanel;
var directions;
function initialize() {
map = new GMap2(document.getElementById("map_canvas"));
directionsPanel = document.getElementById("my_textual_div");
map.setCenter(new GLatLng(49.496675,-102.65625), 3);
directions = new GDirections(map, directionsPanel);
directions.load("New York, NY to Chicago, IL");
}
and on this page http://code.google.com/apis/maps/doc...reference.html
distanceFrom(other, radius?)
Number
Returns the distance, in meters, from this point to the given point. By default, this distance is calculated given the default equatorial earth radius of 6378137 meters. The earth is approximated as a sphere, hence the distance could be off as much as 0.3%, especially in the polar extremes. You may also pass an optional radius argument to calculate distances between GLatLng coordinates on spheres of a different radius than earth. (Since 2.89)
and
getDistance()
Object
Returns an object literal representing the total distance of the directions request (across all routes). The object contains two fields: a number called "meters" indicating the numeric value of the distance (in meters), and a string called "html" containing a localized string representation of the distance in the units that are predominant in the starting country of this set of directions. (Since 2.81)
even if it is technically possible to extract the info (like doing all the submissions etc but keeping it all hidden apart from extracting the info i'm after) google aren't going to like it are they? they said something about not obscuring the logo or soemthing in the sign up bit.
not sure what to do. doesn't look good or am i being pessemistic? thanks.
Bookmarks