I want to make an android application that will intimate the users about the approaching railway stations in INDIA. For this I will use GPS (Location Manager etc) on Android. So far, I have not developed the applications using GPS, so I have little insight on the capabilities of Android API for this. I know, through the android API I can know the current location of the users through GPS and google API but can I know the location of nearby railway stations from Google API for India? Or can I know the latitude and longitude of all the Railway Stations so that I can pre-feed that in the application?
3 Answers
You can insert your lat,lon in this html url
If you fire a http query using this url, and you get a kml file.
Parse this file using a SAX parser and you will get a list of placemarks around you that are railways.
I think you have to use the longitudes and latitudes of the stations in India (as you have mentioned earlier). All the map provider companies in India like SatGuide provide locations of stations in their map and if you want to show them in your application you need to copy the coordinates in your application. It may take a lot of time as there are a large number of stations in India.

- 11
No, it can not be done by default. You have to either using web service which gives you that data or you have to use Google Maps with some queries to do it.

- 19,824
- 17
- 99
- 186

- 9,569
- 7
- 38
- 46
-
Chirag, I do not want things to be done by default. I can do workarounds. Please tell which web service are you talking about. I can use google maps, but please give me either some links to read or the API. – Khushboo Jan 17 '11 at 10:40
-
If anybody has any experiences, then please share. I have already found an Google API from where I can know the lat and long values of a paricaular station in India and so I can show them on Google Map. But I want the reverse thing, If given the lat long value of current location, I want to know the nearest stations. Please help me in discovering the feasibility of this. – Khushboo Jan 18 '11 at 12:27
-
actually its pretty easy to do this @chirag (i mean using google maps) – Reno Feb 23 '11 at 09:27