Fix Moving map when GPS gets lock #1719
This commit is contained in:
parent
f39d800cc1
commit
faa5f8aad2
2 changed files with 2 additions and 4 deletions
|
@ -276,10 +276,8 @@ public class MapViewTrackingUtilities implements OsmAndLocationListener, IMapLoc
|
||||||
@Override
|
@Override
|
||||||
public void locationChanged(double newLatitude, double newLongitude, Object source) {
|
public void locationChanged(double newLatitude, double newLongitude, Object source) {
|
||||||
// when user start dragging
|
// when user start dragging
|
||||||
if(app.getLocationProvider().getLastKnownLocation() != null){
|
|
||||||
setMapLinkedToLocation(false);
|
setMapLinkedToLocation(false);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void switchRotateMapMode(){
|
public void switchRotateMapMode(){
|
||||||
String rotMode = app.getString(R.string.rotate_map_none_opt);
|
String rotMode = app.getString(R.string.rotate_map_none_opt);
|
||||||
|
|
|
@ -121,7 +121,7 @@ public abstract class DashLocationFragment extends DashBaseFragment {
|
||||||
ImageView arrow, int arrowResId, TextView txt, LatLon toLoc,
|
ImageView arrow, int arrowResId, TextView txt, LatLon toLoc,
|
||||||
int screenOrientation, OsmandApplication app, Context ctx, boolean paint) {
|
int screenOrientation, OsmandApplication app, Context ctx, boolean paint) {
|
||||||
float[] mes = new float[2];
|
float[] mes = new float[2];
|
||||||
if (fromLoc != null) {
|
if (fromLoc != null && toLoc != null) {
|
||||||
Location.distanceBetween(toLoc.getLatitude(), toLoc.getLongitude(), fromLoc.getLatitude(), fromLoc.getLongitude(), mes);
|
Location.distanceBetween(toLoc.getLatitude(), toLoc.getLongitude(), fromLoc.getLatitude(), fromLoc.getLongitude(), mes);
|
||||||
}
|
}
|
||||||
if (arrow != null) {
|
if (arrow != null) {
|
||||||
|
|
Loading…
Reference in a new issue