Professional Documents
Culture Documents
Google Maps
Google Maps
This would respond to SMS commands to return the train location to mobile users. The placename corresponding to GPS coordinates is found out using GoogleMaps API. A web query is done to the API passing the GPS coordinates. Enter the URL (which contains the GPS location) in browser, you will get the details for the GPS location as an XML response. From this we can extract the place name in VB or any language of choice. Few test data and their result is as shown : At edappilly (10.035161,76.30404) Request URL : https://maps.googleapis.com/maps/api/place/search/xml? location=10.035161,76.30404&radius=1&sensor=false&key=AIzaSyD1 Cd4iEp2OgxNINA8t58fpfPQkQV0-Ahw <PlaceSearchResponse> <status>OK</status> <result> <name>Lane.8</name> <vicinity>Edapally</vicinity> <type>route</type> <geometry> <location> <lat>10.0357234</lat> <lng>76.3047842</lng> </location> </geometry> <icon> http://maps.gstatic.com/mapfiles/place_api/icons/geocode-71.png </icon> <reference> CnRnAAAAUUOpyulq7B_SHLeOBn_N2BKFLAOmjbkT9_SsdUQZ G9HdwZIJtuO4I202LJPBoEocztQJEcHElZWfbzTLgLkZOcnRwbQFb 6F3EisXS1rqHgnhOTPeOFjwv_CHNawdfGrb0ttww2isPIWPDbUzT1 YEdRIQk3L_VCHvPODdevZX32othoUkgqDk9Bt9TdgJkQmtezHYQDBlQU </reference> <id>4f359893f5528e2c942b603d981c2660dd23ae92</id> </result> </PlaceSearchResponse>
At north railway station (9.992226,76.286606) Request URL : https://maps.googleapis.com/maps/api/place/search/xml? location=9.992226,76.286606&radius=1&sensor=false&key=AIzaSyD1 Cd4iEp2OgxNINA8t58fpfPQkQV0-Ahw <PlaceSearchResponse> <status>OK</status> <result> <name>Ernakulam North</name> <vicinity>Ernakulam</vicinity> <type>train_station</type> <type>transit_station</type> <geometry> <location> <lat>9.9924476</lat> <lng>76.2864792</lng> </location> </geometry> <icon> http://maps.gstatic.com/mapfiles/place_api/icons/geocode-71.png </icon> <reference> CnRvAAAAQFkn_PcxcKeaaNPQScx52_t0jMEEIzKXS3FW5czv7YTUTWTkQZveW HMJ489xieOQgMaLCHTnYRywxrwfGA98wfpgU6QZObLDye1PcbkHIjV9Q8EAMxlm8t1DCdVpI7tQTSbqohAywGuRt4Axh5bx IQuBd5GrBCnphdTrokxb0oshoUS6RFLvA4_1zvbazFgCQfdZkASp4 </reference> <id>24bc936a9f5e0c9dfbb250e1509197439b5c29f0</id> </result> </PlaceSearchResponse>