Fix Moving map when GPS gets lock #1719

This commit is contained in:
Victor Shcherb 2015-09-23 14:02:56 +02:00
parent f39d800cc1
commit faa5f8aad2
2 changed files with 2 additions and 4 deletions

View file

@ -276,9 +276,7 @@ public class MapViewTrackingUtilities implements OsmAndLocationListener, IMapLoc
@Override
public void locationChanged(double newLatitude, double newLongitude, Object source) {
// when user start dragging
if(app.getLocationProvider().getLastKnownLocation() != null){
setMapLinkedToLocation(false);
}
setMapLinkedToLocation(false);
}
public void switchRotateMapMode(){

View file

@ -121,7 +121,7 @@ public abstract class DashLocationFragment extends DashBaseFragment {
ImageView arrow, int arrowResId, TextView txt, LatLon toLoc,
int screenOrientation, OsmandApplication app, Context ctx, boolean paint) {
float[] mes = new float[2];
if (fromLoc != null) {
if (fromLoc != null && toLoc != null) {
Location.distanceBetween(toLoc.getLatitude(), toLoc.getLongitude(), fromLoc.getLatitude(), fromLoc.getLongitude(), mes);
}
if (arrow != null) {