Need a javascript/Gmaps or places API wiz

Soldato
Joined
28 Dec 2004
Posts
7,620
Location
Derry
Hi guys, not sure if anyone can point me in the right direction but I'm trying to display (in text format rather than on a map) the nearest Railway station to a postcode or lat/long. e.g. Nearest Railway Station: Kings Cross (0.5 miles)

I know Google can do it natively but I don't know if there's anything in the API to allow it to be done externally.

Many thanks!
 
I've had to do store locator code before. The way we did it was have a "Markers" table on the server and then based on a certain radius for a given lat/long (callback params) we would do a SELECT statement based on the Haversine formula to find the closest store.

Its not exactly what you're after, but I dont recall seeing a native method/way of doing it.

Maybe you could modify the SELECT statement - start with a small radius and work your way up until you find a station. Although that sounds inefficient to me!

Sorry I cant be of more help
 
Bugger****, I'll just create 2 extra fields in the DB and let the customer enter the station name and distance I think, thanks for your help though.
 
Back
Top Bottom