Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Commit

Permalink
Mapillary Layer: Fix issue with painting across tile borders
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Smock <[email protected]>
  • Loading branch information
tsmock committed Feb 1, 2023
1 parent 56b8ad8 commit c812fdb
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,13 @@ private void drawSequence(final Graphics2D g, final MapView mv, final IWay<?> se
Point previousPoint = null;
for (INode current : nodes) {
final Point currentPoint = mv.getPoint(current);
g.setColor(forcedColor != null ? forcedColor : getColor(current));
if (MapillaryImageUtils.isImage(current)) {
g.setColor(forcedColor != null ? forcedColor : getColor(current));
}
if (previous != null && (mv.contains(currentPoint) || mv.contains(previousPoint))) {
// FIXME get the right color for the line segment
final boolean visibleNode = zoom >= 14 && sequence.isVisible() && MapillaryImageUtils.isImage(previous);
g.drawLine(previousPoint.x, previousPoint.y, currentPoint.x, currentPoint.y);
final boolean visibleNode = zoom < 14 || sequence.isVisible() || MapillaryImageUtils.isImage(previous);
if (visibleNode) {
// FIXME draw the image here (avoid calculating the points twice)
drawImageMarker(originalTransform, selectedImage, g, previous, distPer100Pixel, false);
Expand All @@ -402,7 +404,7 @@ private void drawSequence(final Graphics2D g, final MapView mv, final IWay<?> se
previous = current;
previousPoint = currentPoint;
}
final boolean visibleNode = zoom < 14 || sequence.isVisible() || MapillaryImageUtils.isImage(previous);
final boolean visibleNode = zoom >= 14 && sequence.isVisible() && MapillaryImageUtils.isImage(previous);
if (visibleNode) {
// FIXME draw the image here (avoid calculating the points twice)
drawImageMarker(originalTransform, selectedImage, g, previous, distPer100Pixel, false);
Expand Down

0 comments on commit c812fdb

Please sign in to comment.