refactored some code

This commit is contained in:
Chumva 2018-03-01 15:44:53 +02:00
parent bce81ab430
commit c2138e49b7

View file

@ -215,10 +215,8 @@ public class MapMarkersWidgetsFactory {
return;
}
Float heading = map.getMapViewTrackingUtilities().getHeading();
if(!map.getMapViewTrackingUtilities().isMapLinkedToLocation()){
heading=0f;
}
boolean mapLinkedToLoc = map.getMapViewTrackingUtilities().isMapLinkedToLocation();
Float heading = !mapLinkedToLoc ? 0f : map.getMapViewTrackingUtilities().getHeading();
MapMarker marker = markers.get(0);
updateUI(loc, heading, marker, arrowImg, distText, okButton, addressText, true, customLocation != null);