--- android/TrainInfoService/src/dk/thoerup/traininfoservice/LocateStations.java 2009/10/29 19:50:02 491
+++ android/TrainInfoService/src/dk/thoerup/traininfoservice/LocateStations.java 2009/11/01 16:35:48 492
@@ -48,7 +48,7 @@
if (req.getParameter("latitude") != null && req.getParameter("latitude") != null) {
//inner select is workaround from not being able to use a calculated column directly in where clause
SQL = "SELECT * FROM ( "+
- " SELECT id,name,latitude,longitude,stationcode_fjrn,stationcode_stog, " +
+ " SELECT id,name,latitude,longitude,stationcode_fjrn,stationcode_stog, address," +
" earth_distance( ll_to_earth(latitude,longitude), ll_to_earth(?,?))::int AS calcdist " +
" FROM trainstations " +
" WHERE enabled = true " +
@@ -61,7 +61,7 @@
stmt.setDouble(1, latitude);
stmt.setDouble(2, longitude);
} else if (req.getParameter("name") != null) {
- SQL = "SELECT id,name,latitude,longitude,stationcode_fjrn,stationcode_stog,0.0 " +
+ SQL = "SELECT id,name,latitude,longitude,stationcode_fjrn,stationcode_stog, address, 0.0 " +
"FROM trainstations " +
"WHERE name ILIKE ? AND enabled = true " +
"ORDER BY name ";
@@ -71,7 +71,7 @@
stmt.setString(1, name + "%");
} else if (req.getParameter("list") != null) {
String list = transformToIntList( req.getParameter("list"));
- SQL = "SELECT id,name,latitude,longitude,stationcode_fjrn,stationcode_stog,0.0 " +
+ SQL = "SELECT id,name,latitude,longitude,stationcode_fjrn,stationcode_stog,address,0.0 " +
"FROM trainstations " +
"WHERE id IN " + list + " AND enabled = true " +
"ORDER BY name ";
@@ -105,7 +105,10 @@
buff.append("