Re: showing NEAREST train Stations from the property postcode

Skip to first unread message


Jan 3, 2012, 6:43:35 AM1/3/12
to Google Maps JavaScript API v3
Re: showing NEAREST train Stations from the property postcode

I want to know how and where to find the codes if I want to show MAPS
with Nearest train station from each property I upload.

for example:

The moment property is uploaded on rightmove, the maps shows nearest
station from the property postcode.

Anybody can pls give me an idea on how to progress from this point???


Jan 3, 2012, 8:23:50 PM1/3/12
to Google Maps JavaScript API v3
It looks like is determining the nearest stations
server-side. The easiest way to do that is to just get a database of
all the train station lat/lngs (that would be almost trivial), and
then use ordinary database programming to find the three closest.

I don't see that rightmove places those stations on the map, but once
you know the lat/lng of the three stations you want, it would not be
difficult to just fitBounds the map to include those lat/lngs, and the
stations are already there.

In other words, this isn't really a google maps question.

- Jeff

On Jan 3, 3:43 am, Paull <>

Alan Pearce

Jan 3, 2012, 11:04:31 PM1/3/12
to Google Maps JavaScript API v3
You may be able to do this with the Maps Places Library. See

You can make a place request and pass the lat/lng of the property with
a search radius and specify the type to be train_station.

If you don't have the lat/lng you will need to do a geocode look up

Hope this helps,

On Jan 3, 5:43 am, Paull <>


Jan 4, 2012, 5:42:31 AM1/4/12
to Google Maps JavaScript API v3
Hi Paull
Something like
Works with UK postcode or city/town

Regard Davie

claremont estates

Jan 4, 2012, 7:23:12 AM1/4/12
@ Alan: I somehow manage to gather all UK postcodes with latitudes and longitudes.

Now I want to progress further from this point which sounds lot of scripting and database work. Doing directly from google maps sounds difficult and might be not possible.

Any other option you can recommend, have on how to progress further when I have postcodes???

You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

claremont estates

Jan 4, 2012, 7:27:03 AM1/4/12
Davie, the link you send me looks i could reach somewhere from there. I need train stations only less than 2miles(so customer know their property is not far).

Do you have anything with London underground stations? the link you send only shows National rails in UK.


prabhakaran s

Dec 17, 2018, 7:47:28 PM12/17/18
to [deprecated] Google Maps JavaScript API v3. Please use the latest post.
Hi Paull,

How to get airport location and railway junction in the current city.
Reply all
Reply to author
0 new messages