This commit is contained in:
Victor Shcherb 2012-08-31 23:26:28 +02:00
parent 0c59b0b290
commit 7ab4ae98e9
2 changed files with 2 additions and 2 deletions

View file

@ -844,7 +844,7 @@ public class MapActivity extends AccessibleActivity implements IMapLocationListe
// Update information // Update information
mapLayers.getLocationLayer().setLastKnownLocation(updatedLocation); mapLayers.getLocationLayer().setLastKnownLocation(updatedLocation);
if (location != null) { if (updatedLocation != null) {
updateAutoMapViewConfiguration(updatedLocation); updateAutoMapViewConfiguration(updatedLocation);
} else { } else {
if (mapLayers.getMapInfoLayer().getBackToLocation().isEnabled()) { if (mapLayers.getMapInfoLayer().getBackToLocation().isEnabled()) {

View file

@ -242,7 +242,7 @@ public class RoutingHelper {
route.isCalculated()? route : null); route.isCalculated()? route : null);
} }
double projectDist = mode == ApplicationMode.CAR ? posTolerance : posTolerance / 2; double projectDist = mode == ApplicationMode.CAR ? posTolerance : posTolerance / 2;
if(returnUpdatedLocation && currentLocation.distanceTo(locationProjection) < projectDist) { if(returnUpdatedLocation && locationProjection != null && currentLocation.distanceTo(locationProjection) < projectDist) {
return locationProjection; return locationProjection;
} else { } else {
return currentLocation; return currentLocation;