Re: showing NEAREST train Stations from the property postcode

1701 views
Skip to first unread message

Paull

unread,
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:

www.rightmove.co.uk/property-for-sale/property-35885240.html

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???

JKurtock

unread,
Jan 3, 2012, 8:23:50 PM1/3/12
to Google Maps JavaScript API v3
It looks like www.rightmove.co 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 <claremontestateswhitecha...@gmail.com>
wrote:

Alan Pearce

unread,
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
http://code.google.com/apis/maps/documentation/javascript/places.html

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
first.

Hope this helps,
Alan

On Jan 3, 5:43 am, Paull <claremontestateswhitecha...@gmail.com>
wrote:

davie

unread,
Jan 4, 2012, 5:42:31 AM1/4/12
to Google Maps JavaScript API v3
Hi Paull
Something like http://daviestrachan.zxq.net/maps/stationmap.php
Works with UK postcode or city/town

Regard Davie


claremont estates

unread,
Jan 4, 2012, 7:23:12 AM1/4/12
to google-map...@googlegroups.com
@ 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 google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.


claremont estates

unread,
Jan 4, 2012, 7:27:03 AM1/4/12
to google-map...@googlegroups.com
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.

thanx!

prabhakaran s

unread,
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
Forward
0 new messages