Fix avoid roads icon position
This commit is contained in:
parent
7038311bae
commit
07fe241f9e
1 changed files with 2 additions and 3 deletions
|
@ -92,9 +92,8 @@ public class ImpassableRoadsLayer extends OsmandMapLayer implements
|
|||
|
||||
private void drawPoint(Canvas canvas, float x, float y, boolean active) {
|
||||
float textScale = activity.getMyApplication().getSettings().TEXT_SCALE.get();
|
||||
float left = x - roadWorkIcon.getWidth() / 2f * textScale;
|
||||
float top = y - roadWorkIcon.getHeight() * textScale;
|
||||
Rect destRect = getIconDestinationRect(left, top, roadWorkIcon.getWidth(), roadWorkIcon.getHeight(), textScale);
|
||||
y -= roadWorkIcon.getHeight() / 2f * textScale;
|
||||
Rect destRect = getIconDestinationRect(x, y, roadWorkIcon.getWidth(), roadWorkIcon.getHeight(), textScale);
|
||||
canvas.drawBitmap(roadWorkIcon, null, destRect, active ? activePaint : paint);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue