private void enableLocation() { try { // force it to think it's own location listening is on myLocationOverlay.mLocationListener = new LocationListenerProxy(null); STATIC_LOCATION_LISTENER = myLocationOverlay; MainActivity.getListActivity(this).getGPSListener().setMapListener(myLocationOverlay); myLocationOverlay.enableMyLocation(); } catch (Exception ex) { ListActivity.error("Could not enableLocation for maps: " + ex, ex); } }
@Override protected void onResume() { // TODO Auto-generated method stub try { super.onResume(); PhimpMe.showTabs(); if (PhimpMe.IdList.size() == 5) { PhimpMe.IdList.clear(); PhimpMe.IdList.add(0); } PhimpMe.IdList.add(1); myLocationOverlay.enableMyLocation(); myLocationOverlay.enableCompass(); } catch (UnsupportedOperationException e) { } }