/[projects]/android/TrainInfo/src/dk/thoerup/traininfo/provider/GoogleStationProvider.java
ViewVC logotype

Diff of /android/TrainInfo/src/dk/thoerup/traininfo/provider/GoogleStationProvider.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 318 by torben, Thu Aug 27 08:34:50 2009 UTC revision 319 by torben, Fri Sep 11 12:24:53 2009 UTC
# Line 16  public class GoogleStationProvider imple Line 16  public class GoogleStationProvider imple
16          List<StationBean> stations = new ArrayList<StationBean>();          List<StationBean> stations = new ArrayList<StationBean>();
17                    
18          @Override          @Override
19          public void lookupStations(Location location) {          public boolean lookupStations(Location location) {
20                    boolean success = false;
21                  //ToDo: to be nice put the api key into the request                  //ToDo: to be nice put the api key into the request
22                  String urlSource = "http://www.google.com/uds/GlocalSearch?callback=google.search.LocalSearch.RawCompletion&context=1&q=Train%20station&near=" + location.getLatitude() + "%2C" + location.getLongitude() + "&v=1.0";                  String urlSource = "http://www.google.com/uds/GlocalSearch?callback=google.search.LocalSearch.RawCompletion&context=1&q=Train%20station&near=" + location.getLatitude() + "%2C" + location.getLongitude() + "&v=1.0";
23                  //String urlSource = "http://www.google.com/uds/GlocalSearch?callback=google.search.LocalSearch.RawCompletion&context=1&q=Train%20station&near=56.2%2C9.0&v=1.0";                  //String urlSource = "http://www.google.com/uds/GlocalSearch?callback=google.search.LocalSearch.RawCompletion&context=1&q=Train%20station&near=56.2%2C9.0&v=1.0";
# Line 54  public class GoogleStationProvider imple Line 55  public class GoogleStationProvider imple
55                                  Log.e("Location", title + " " + lat +"," + lng);                                  Log.e("Location", title + " " + lat +"," + lng);
56                          }                          }
57    
58                            success = true;
59                  } catch (Exception e) {                  } catch (Exception e) {
60                          Log.e("Location","Location",e);                          Log.e("Location","Location",e);
61                  }                  }
62                    return success;
63          }          }
64    
65          @Override          @Override

Legend:
Removed from v.318  
changed lines
  Added in v.319

  ViewVC Help
Powered by ViewVC 1.1.20