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

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

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

revision 433 by torben, Sat Oct 10 11:30:08 2009 UTC revision 574 by torben, Mon Feb 1 16:52:52 2010 UTC
# Line 28  public class XmlStationProvider implemen Line 28  public class XmlStationProvider implemen
28    
29          @Override          @Override
30          public boolean lookupStations(Location location) {          public boolean lookupStations(Location location) {
31                  String url = XmlUtil.SERVICE_BASE + "/LocateStations?latitude=" + location.getLatitude() + "&longitude=" + location.getLongitude();                  String url = XmlUtil.SERVICE_BASE + "/LocateStations?latitude=" + (float)location.getLatitude() + "&longitude=" + (float)location.getLongitude();
32                  Log.i("url", url);                  Log.i("url", url);
33                  return lookupStationsWorker(url);                  return lookupStationsWorker(url);
34          }          }
# Line 102  public class XmlStationProvider implemen Line 102  public class XmlStationProvider implemen
102                                                  station.setLatitude( Double.parseDouble(content) );                                                  station.setLatitude( Double.parseDouble(content) );
103                                                                                    
104                                          if (nodeName.equals("longitude"))                                          if (nodeName.equals("longitude"))
105                                                  station.setLongitude( Double.parseDouble(content) );                                                  station.setLongitude( Double.parseDouble(content) );                                    
                                           
                                         if (nodeName.equals("stationcode"))  
                                                 station.setCode(content);  
106                                                                                    
107                                          if (nodeName.equals("calcdist"))                                          if (nodeName.equals("calcdist"))
108                                                  station.setDistance( (int) Double.parseDouble(content) );                                                  station.setDistance( (int) Double.parseDouble(content) );
109                                            
110                                            if (nodeName.equals("address"))
111                                                    station.setAddress( content );
112                                            
113                                            if (nodeName.equals("regional"))
114                                                    station.setRegional( Boolean.parseBoolean(content) );
115                                            
116                                            if (nodeName.equals("strain"))
117                                                    station.setSTrain( Boolean.parseBoolean(content) );
118                                            
119                                            if (nodeName.equals("metro"))
120                                                    station.setMetro( Boolean.parseBoolean(content) );
121    
122                                  }                                  }
123                                  stations.add(station);                                                            stations.add(station);                          

Legend:
Removed from v.433  
changed lines
  Added in v.574

  ViewVC Help
Powered by ViewVC 1.1.20