Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
fc583bd5c5
1 changed files with 12 additions and 1 deletions
|
@ -22,6 +22,7 @@ import net.osmand.plus.MapMarkersHelper;
|
||||||
import net.osmand.plus.MapMarkersHelper.MapMarker;
|
import net.osmand.plus.MapMarkersHelper.MapMarker;
|
||||||
import net.osmand.plus.OsmAndConstants;
|
import net.osmand.plus.OsmAndConstants;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.TargetPointsHelper.TargetPoint;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.views.ContextMenuLayer.IContextMenuProvider;
|
import net.osmand.plus.views.ContextMenuLayer.IContextMenuProvider;
|
||||||
import net.osmand.plus.views.ContextMenuLayer.IContextMenuProviderSelection;
|
import net.osmand.plus.views.ContextMenuLayer.IContextMenuProviderSelection;
|
||||||
|
@ -250,7 +251,7 @@ public class MapMarkersLayer extends OsmandMapLayer implements IContextMenuProvi
|
||||||
List<MapMarker> activeMapMarkers = markersHelper.getActiveMapMarkers();
|
List<MapMarker> activeMapMarkers = markersHelper.getActiveMapMarkers();
|
||||||
for (int i = 0; i < activeMapMarkers.size(); i++) {
|
for (int i = 0; i < activeMapMarkers.size(); i++) {
|
||||||
MapMarker marker = activeMapMarkers.get(i);
|
MapMarker marker = activeMapMarkers.get(i);
|
||||||
if (isLocationVisible(tb, marker)) {
|
if (isLocationVisible(tb, marker) && !overlappedByWaypoint(marker)) {
|
||||||
Bitmap bmp = getMapMarkerBitmap(marker.colorIndex);
|
Bitmap bmp = getMapMarkerBitmap(marker.colorIndex);
|
||||||
int marginX = bmp.getWidth() / 6;
|
int marginX = bmp.getWidth() / 6;
|
||||||
int marginY = bmp.getHeight();
|
int marginY = bmp.getHeight();
|
||||||
|
@ -304,6 +305,16 @@ public class MapMarkersLayer extends OsmandMapLayer implements IContextMenuProvi
|
||||||
return tx >= 0 && tx <= tb.getPixWidth() && ty >= widgetHeight && ty <= tb.getPixHeight();
|
return tx >= 0 && tx <= tb.getPixWidth() && ty >= widgetHeight && ty <= tb.getPixHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean overlappedByWaypoint(MapMarker marker) {
|
||||||
|
List<TargetPoint> targetPoints = map.getMyApplication().getTargetPointsHelper().getAllPoints();
|
||||||
|
for (TargetPoint t : targetPoints) {
|
||||||
|
if (t.point.equals(marker.point)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void destroyLayer() {
|
public void destroyLayer() {
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue