--- android/TrainInfo/src/dk/thoerup/traininfo/StationList.java 2009/09/30 19:49:25 373 +++ android/TrainInfo/src/dk/thoerup/traininfo/StationList.java 2009/09/30 20:38:47 374 @@ -48,6 +48,8 @@ LocationLookup locator = null; LocatorTask locatorTask; + GeoPair location = new GeoPair(); + boolean isRunning = false; List stations = new ArrayList(); @@ -71,6 +73,7 @@ } else { stations = (ArrayList) savedInstanceState.getSerializable("stations"); adapter.setStations(stations); + location = (GeoPair) savedInstanceState.getSerializable("location"); } } @@ -81,6 +84,7 @@ if (dialog != null && dialog.isShowing()) dialog.dismiss(); outState.putSerializable("stations", (ArrayList) stations); + outState.putSerializable("location", location); } @@ -101,7 +105,7 @@ case OPTIONS_MAP: Intent intent = new Intent(this,StationMapView.class); - intent.putExtra("userlocation", GeoPair.fromLocation(locator.getLocation()) ); + intent.putExtra("userlocation", location ); ArrayList stationPoints = new ArrayList(); for (StationBean st : stations ) { @@ -178,6 +182,7 @@ dismissDialog(DLG_PROGRESS); startLocatorTask(); + location = GeoPair.fromLocation( locator.getLocation() ); break;