Remove unnecessary method
This commit is contained in:
parent
d1de3a8dd1
commit
75edb73989
2 changed files with 4 additions and 8 deletions
|
@ -107,9 +107,6 @@ public class MapViewTrackingUtilities implements OsmAndLocationListener, IMapLoc
|
|||
}
|
||||
}
|
||||
|
||||
public Location getMyLocation() {
|
||||
return myLocation;
|
||||
}
|
||||
|
||||
public Float getHeading() {
|
||||
return heading;
|
||||
|
@ -124,7 +121,8 @@ public class MapViewTrackingUtilities implements OsmAndLocationListener, IMapLoc
|
|||
heading = val;
|
||||
if (mapView != null) {
|
||||
float speedForDirectionOfMovement = settings.SWITCH_MAP_DIRECTION_TO_COMPASS.get();
|
||||
boolean smallSpeedForDirectionOfMovement = speedForDirectionOfMovement != 0 && getMyLocation() != null && isSmallSpeedForDirectionOfMovement(getMyLocation(), speedForDirectionOfMovement);
|
||||
boolean smallSpeedForDirectionOfMovement = speedForDirectionOfMovement != 0 &&
|
||||
myLocation != null && isSmallSpeedForDirectionOfMovement(myLocation, speedForDirectionOfMovement);
|
||||
if ((settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_COMPASS || (settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_BEARING && smallSpeedForDirectionOfMovement)) && !routePlanningMode) {
|
||||
if (Math.abs(MapUtils.degreesDiff(mapView.getRotate(), -val)) > 1) {
|
||||
mapView.setRotate(-val);
|
||||
|
|
|
@ -70,11 +70,9 @@ public class MapMarkerSelectionFragment extends BaseOsmAndDialogFragment {
|
|||
Float head = trackingUtils.getHeading();
|
||||
float mapRotation = mapActivity.getMapRotate();
|
||||
LatLon mw = mapActivity.getMapLocation();
|
||||
Location l = trackingUtils.getMyLocation();
|
||||
boolean mapLinked = trackingUtils.isMapLinkedToLocation() && l != null;
|
||||
LatLon myLoc = l == null ? null : new LatLon(l.getLatitude(), l.getLongitude());
|
||||
boolean mapLinked = trackingUtils.isMapLinkedToLocation();
|
||||
useCenter = !mapLinked;
|
||||
loc = (useCenter ? mw : myLoc);
|
||||
loc = mw;
|
||||
if (useCenter) {
|
||||
heading = -mapRotation;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue