aboutsummaryrefslogtreecommitdiff
path: root/src/net/cbaines/suma/MapActivity.java
diff options
context:
space:
mode:
authorChristopher Baines <cbaines8@gmail.com>2012-02-18 21:14:17 +0000
committerChristopher Baines <cbaines8@gmail.com>2012-02-18 21:14:17 +0000
commit4ee5e20a86f34961ffaf2081f2602e1486de6f92 (patch)
tree57ef79ee93ca5d38dda2fb86aac275c1586c54a5 /src/net/cbaines/suma/MapActivity.java
parentb374a50fb6f3bd0866bc1f75f7592abb0a6b8cc1 (diff)
downloadsouthamptonuniversitymap-4ee5e20a86f34961ffaf2081f2602e1486de6f92.tar
southamptonuniversitymap-4ee5e20a86f34961ffaf2081f2602e1486de6f92.tar.gz
More bug fixes, working non uni link bus times, just need to get the non uni link bus stops working :)
Diffstat (limited to 'src/net/cbaines/suma/MapActivity.java')
-rw-r--r--src/net/cbaines/suma/MapActivity.java33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/net/cbaines/suma/MapActivity.java b/src/net/cbaines/suma/MapActivity.java
index 4d9eddc..c0a2aba 100644
--- a/src/net/cbaines/suma/MapActivity.java
+++ b/src/net/cbaines/suma/MapActivity.java
@@ -78,7 +78,7 @@ public class MapActivity extends OrmLiteBaseActivity<DatabaseHelper> implements
* 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;
@@ -444,15 +444,15 @@ public class MapActivity extends OrmLiteBaseActivity<DatabaseHelper> implements
showUtilityOverlays();
- showUniLinkBusStopOverlays();
+ showUniLinkBusStopOverlay();
- showNonUniLinkBusStopOverlays();
+ showNonUniLinkBusStopOverlay();
if (activityPrefs.getBoolean(BUILDING_OVERLAYS + RESIDENTIAL_BUILDING_OVERLAY,
RESIDENTIAL_BUILDING_OVERLAY_ENABLED_BY_DEFAULT)
|| activityPrefs.getBoolean(BUILDING_OVERLAYS + NON_RESIDENTIAL_BUILDING_OVERLAY,
NON_RESIDENTIAL_BUILDING_OVERLAY_ENABLED_BY_DEFAULT)) {
- showBuildingOverlay();
+ showBuildingOverlays();
}
Log.i(TAG, "Begining to show the route overlays at " + (System.currentTimeMillis() - startTime));
@@ -662,7 +662,7 @@ public class MapActivity extends OrmLiteBaseActivity<DatabaseHelper> implements
}).start();
}
- private void showBuildingOverlay() {
+ private void showBuildingOverlays() {
new Thread(new Runnable() {
public void run() {
Log.i(TAG, "Begining showing building overlays at " + (System.currentTimeMillis() - startTime));
@@ -728,10 +728,10 @@ public class MapActivity extends OrmLiteBaseActivity<DatabaseHelper> implements
}
}
- residentialBuildingOverlay.setEnabled(activityPrefs.getBoolean(RESIDENTIAL_BUILDING_OVERLAY,
- RESIDENTIAL_BUILDING_OVERLAY_ENABLED_BY_DEFAULT));
- nonResidentialBuildingOverlay.setEnabled(activityPrefs.getBoolean(RESIDENTIAL_BUILDING_OVERLAY,
- NON_RESIDENTIAL_BUILDING_OVERLAY_ENABLED_BY_DEFAULT));
+ residentialBuildingOverlay.setEnabled(activityPrefs.getBoolean(BUILDING_OVERLAYS
+ + RESIDENTIAL_BUILDING_OVERLAY, RESIDENTIAL_BUILDING_OVERLAY_ENABLED_BY_DEFAULT));
+ nonResidentialBuildingOverlay.setEnabled(activityPrefs.getBoolean(BUILDING_OVERLAYS
+ + NON_RESIDENTIAL_BUILDING_OVERLAY, NON_RESIDENTIAL_BUILDING_OVERLAY_ENABLED_BY_DEFAULT));
mapView.postInvalidate();
@@ -740,7 +740,7 @@ public class MapActivity extends OrmLiteBaseActivity<DatabaseHelper> implements
}).start();
}
- private void showUniLinkBusStopOverlays() {
+ private void showUniLinkBusStopOverlay() {
new Thread(new Runnable() {
public void run() {
Log.i(TAG, "Begining showing bus stop overlays at " + (System.currentTimeMillis() - startTime));
@@ -800,10 +800,11 @@ public class MapActivity extends OrmLiteBaseActivity<DatabaseHelper> implements
}).start();
}
- private void showNonUniLinkBusStopOverlays() {
+ private void showNonUniLinkBusStopOverlay() {
new Thread(new Runnable() {
public void run() {
- Log.i(TAG, "Begining showing bus stop overlays at " + (System.currentTimeMillis() - startTime));
+ Log.i(TAG, "Begining showing non uni link bus stop overlays at "
+ + (System.currentTimeMillis() - startTime));
final SharedPreferences activityPrefs = getPreferences(0);
final OverlayRankComparator comparator = new OverlayRankComparator(getPreferences(0));
@@ -1198,9 +1199,9 @@ public class MapActivity extends OrmLiteBaseActivity<DatabaseHelper> implements
} else if (key.equals(UNI_LINK_BUS_TIMES)) {
// Noting to do here atm
} else if (key.startsWith(BUS_STOP_OVERLAYS)) {
- showUniLinkBusStopOverlays();
- } else if (key.startsWith(NON_UNI_LINK_BUS_STOPS)) {
- showNonUniLinkBusStopOverlays();
+ showUniLinkBusStopOverlay();
+ } else if (key.equals(NON_UNI_LINK_BUS_STOPS)) {
+ showNonUniLinkBusStopOverlay();
} else if (key.startsWith(BUS_ROUTE_OVERLAYS)) {
try {
String routeName = key.substring(BUS_ROUTE_OVERLAYS.length(), key.length());
@@ -1214,7 +1215,7 @@ public class MapActivity extends OrmLiteBaseActivity<DatabaseHelper> implements
e.printStackTrace();
}
} else if (key.startsWith(BUILDING_OVERLAYS)) {
- showBuildingOverlay();
+ showBuildingOverlays();
} else if (key.startsWith(SITE_OVERLAYS)) {
String siteName = key.substring(SITE_OVERLAYS.length(), key.length());
try {