Merge branch 'sasha_pasha_branch' of ssh://github.com/osmandapp/Osmand into sasha_pasha_branch

This commit is contained in:
PavelRatushnyi 2017-09-20 14:08:48 +03:00
commit 927ae5345e

View file

@ -226,12 +226,12 @@ public class MapMarkersLayer extends OsmandMapLayer implements IContextMenuProvi
List<MapMarker> activeMapMarkers = markersHelper.getMapMarkers(); List<MapMarker> activeMapMarkers = markersHelper.getMapMarkers();
if (settings.SHOW_LINES_TO_FIRST_MARKERS.get()) { if (settings.SHOW_LINES_TO_FIRST_MARKERS.get() && myLoc != null) {
linePath.reset(); linePath.reset();
tx.clear(); tx.clear();
ty.clear(); ty.clear();
int locX = myLoc == null ? tileBox.getCenterPixelX() : tileBox.getPixXFromLonNoRot(myLoc.getLongitude()); int locX = tileBox.getPixXFromLonNoRot(myLoc.getLongitude());
int locY = myLoc == null ? tileBox.getCenterPixelY() : tileBox.getPixYFromLatNoRot(myLoc.getLatitude()); int locY = tileBox.getPixYFromLatNoRot(myLoc.getLatitude());
for (int i = 0; i < activeMapMarkers.size() && i < 2; i++) { for (int i = 0; i < activeMapMarkers.size() && i < 2; i++) {
int markerX = tileBox.getPixXFromLonNoRot(activeMapMarkers.get(i).getLongitude()); int markerX = tileBox.getPixXFromLonNoRot(activeMapMarkers.get(i).getLongitude());
int markerY = tileBox.getPixYFromLatNoRot(activeMapMarkers.get(i).getLatitude()); int markerY = tileBox.getPixYFromLatNoRot(activeMapMarkers.get(i).getLatitude());