aboutsummaryrefslogtreecommitdiff
path: root/src/net/cbaines/suma/MapActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/cbaines/suma/MapActivity.java')
-rw-r--r--src/net/cbaines/suma/MapActivity.java27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/net/cbaines/suma/MapActivity.java b/src/net/cbaines/suma/MapActivity.java
index 33b12cd..14a1dd4 100644
--- a/src/net/cbaines/suma/MapActivity.java
+++ b/src/net/cbaines/suma/MapActivity.java
@@ -74,10 +74,10 @@ public class MapActivity extends OrmLiteBaseActivity<DatabaseHelper> implements
OnItemClickListener, OnItemLongClickListener, OnSharedPreferenceChangeListener, Preferences {
/**
- * Enable to use the database in the assets folder, if its not enabled, the
- * database is built from the csv files in the assets folder
+ * Enable to use the database in the assets folder, if its not enabled, the database is built from the csv files in the assets
+ * folder
*/
- private boolean useBundledDatabase = false;
+ private boolean useBundledDatabase = true;
private MapView mapView;
private MapController mapController;
@@ -173,8 +173,7 @@ public class MapActivity extends OrmLiteBaseActivity<DatabaseHelper> implements
OTHER_OVERLAY_NAMES };
/**
- * The toast for this activity, storing the toast centrally allows it to be
- * changed quickly, instead of a queue building up
+ * The toast for this activity, storing the toast centrally allows it to be changed quickly, instead of a queue building up
*/
Toast activityToast;
@@ -205,10 +204,8 @@ public class MapActivity extends OrmLiteBaseActivity<DatabaseHelper> implements
pastOverlays = (HashMap<String, Overlay>) getLastNonConfigurationInstance();
/*
- * SensorManager mSensorManager = (SensorManager)
- * getSystemService(Context.SENSOR_SERVICE); This code in the following
- * constructor causes problems in some emulators, disable sensors to
- * fix.
+ * SensorManager mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); This code in the following
+ * constructor causes problems in some emulators, disable sensors to fix.
*/
Log.i(TAG, "Starting creating myLocationOverlay");
myLocationOverlay = new MyLocationOverlay(instance, mapView);
@@ -555,10 +552,12 @@ public class MapActivity extends OrmLiteBaseActivity<DatabaseHelper> implements
routeOverlayU1E.getPaint().setAlpha(145);
routeOverlayU1E.getPaint().setStrokeWidth(12);
routeOverlayU1E.getPaint().setPathEffect(new DashPathEffect(new float[] { 20, 16 }, 0));
- routeOverlayU1E.setEnabled(activityPrefs.getBoolean("Bus Routes:" + route.code, true));
busRouteOverlays.put(new BusRoute(1000, "U1E", "U1E Route Label", true), routeOverlayU1E);
- overlays.put(BUS_ROUTE_OVERLAYS + route.code + "E", routeOverlayU1E);
+ overlays.put(BUS_ROUTE_OVERLAYS + "U1E", routeOverlayU1E);
+ synchronized (mapView.getOverlays()) {
+ mapView.getOverlays().add(routeOverlayU1E);
+ }
} else if (route.code.equals("U1N")) {
resource = getResources().openRawResource(R.raw.u1n);
colour = U1N;
@@ -1038,11 +1037,9 @@ public class MapActivity extends OrmLiteBaseActivity<DatabaseHelper> implements
}
/*
- * public boolean onChildClick(ExpandableListView parent, View v, int
- * groupPosition, int childPosition, long id) {
+ * public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) {
*
- * mapView.post(new Runnable() { public void run() { //
- * updateEnabledOverlays(); TODO Fix whatever this did?
+ * mapView.post(new Runnable() { public void run() { // updateEnabledOverlays(); TODO Fix whatever this did?
* mapView.invalidate(); } });
*
* return true; }