views:

48

answers:

1

Hey guys, I searched the web but for now I didn't found anything.

Is it possible to find the nearest bus/train/ official stations of public transportation types?

The 'nearest' is a seperate case ;=)

but is it just possible to find them? this is that i'm searchin :)

http://img443.imageshack.us/img443/7203/bild2zy.png

They are tagged, but I'm searching how to access /find them.

Would be glad about any suggestions,

Thanks alot :)

:)

A: 

I don't think that this is supported in Google Maps yet, finding the nearby public transport locations of a spot.

The only workaround I could think of is to use the location you want to get the nearest public transportation as a starting point of a directions calculation. As the destination, you choose any random location that's a little away but far enough so the route would require a public transportation (not just walking). Then you could fetch the first public transportation from the resulting data.

For example: if you have calculated a route like this:

http://maps.google.com/maps?f=d&source=s_d&saddr=15+Vanderbilt+Avenue,+New+York,+NY+10017+(Grand+Central+Terminal)&daddr=central+park&hl=en&geocode=CUdYBSaiyFjNFWbXbQIdIDOX-yFZWQrti_yyniknhhaRAVnCiTHFY7RT82_HCg%3BFT0ebgIdVT6X-yn1xwsBmljCiTG2GSD9L5ZZwQ&mra=pe&mrcr=0&dirflg=r&ttype=dep&date=06%2F22%2F10&time=10:34am&noexp=0&noal=0&sort=&sll=40.764379,-73.974187&sspn=0.093872,0.154324&ie=UTF8&z=15&start=0

you would just add the parameter &output=json to the url and could fetch the data as json format.

http://maps.google.com/maps?f=d&source=s_d&saddr=15+Vanderbilt+Avenue,+New+York,+NY+10017+(Grand+Central+Terminal)&daddr=central+park&hl=en&geocode=CUdYBSaiyFjNFWbXbQIdIDOX-yFZWQrti_yyniknhhaRAVnCiTHFY7RT82_HCg%3BFT0ebgIdVT6X-yn1xwsBmljCiTG2GSD9L5ZZwQ&mra=pe&mrcr=0&dirflg=r&ttype=dep&date=06%2F22%2F10&time=10:34am&noexp=0&noal=0&sort=&sll=40.764379,-73.974187&sspn=0.093872,0.154324&ie=UTF8&z=15&start=0&output=json

In this sample you would get "Bus M02" as the first public transportation.

But this is really a very bad workaround. I think gotta wait until Google opens the API for that.

Mathias Lin
thanks a lot for your suggestion ...uff.. i really want to develop this feature.. so... :=)your approach just .. does the job ;=)when finished.. i'll post again!thank you!
cV2