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 |
} |
} |
104 |
if (nodeName.equals("longitude")) |
if (nodeName.equals("longitude")) |
105 |
station.setLongitude( Double.parseDouble(content) ); |
station.setLongitude( Double.parseDouble(content) ); |
106 |
|
|
|
if (nodeName.equals("stationcode")) |
|
|
station.setCode(content); |
|
|
|
|
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")) |
if (nodeName.equals("address")) |
111 |
station.setAddress( content ); |
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); |