Index: applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/DefaultElevationProfileRenderer.java
===================================================================
--- applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/DefaultElevationProfileRenderer.java	(revision 23756)
+++ applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/DefaultElevationProfileRenderer.java	(revision 23757)
@@ -27,4 +27,6 @@
 import java.awt.geom.AffineTransform;
 import java.awt.geom.Point2D;
+import java.util.ArrayList;
+import java.util.List;
 
 import org.openstreetmap.josm.data.gpx.WayPoint;
@@ -45,5 +47,5 @@
 	 * 
 	 */
-	private static final int TRIANGLE_BASESIZE = 12;
+	private static final int TRIANGLE_BASESIZE = 24;
 	/**
 	 * 
@@ -63,4 +65,6 @@
 	// private static final double RAD_270 = Math.PI * 1.5;
 	private static final double RAD_90 = Math.PI * 0.5;
+	
+	private List<Rectangle> forbiddenRects = new ArrayList<Rectangle>();
 
 	/*
@@ -405,12 +409,17 @@
 		int height = g.getFont().getSize() + g.getFontMetrics().getLeading() + 5;
 
+		Rectangle r = new Rectangle(x - (width / 2), y - (height / 2), width, height);
+		
+		if (isForbiddenArea(r)) { 
+			return; // no space left, skip this label
+		}
+		
 		g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
-				RenderingHints.VALUE_ANTIALIAS_ON);
-		
+				RenderingHints.VALUE_ANTIALIAS_ON);		
 		GradientPaint gradient = new GradientPaint(x, y, Color.WHITE, x, y
-				+ height, secondGradColor, false);
+				+ (height/2), secondGradColor, false);
 		g2d.setPaint(gradient);		
 
-		Rectangle r = new Rectangle(x - (width / 2), y - (height / 2), width, height);
+		
 		g2d.fillRoundRect(r.x, r.y, r.width, r.height, ROUND_RECT_RADIUS, ROUND_RECT_RADIUS);
 		
@@ -419,4 +428,29 @@
 		g2d.drawRoundRect(r.x, r.y, r.width, r.height, ROUND_RECT_RADIUS, ROUND_RECT_RADIUS);		
 		g2d.drawString(s, x - (width / 2) + 5, y + (height / 2) - 3);
+		
+		forbiddenRects.add(r);
+	}
+	
+	/**
+	 * Checks, if the rectangle has been 'reserved' by a previous draw action.
+	 * @param r The area to check for.
+	 * @return true; if area is already occupied by another rectangle.
+	 */
+	private boolean isForbiddenArea(Rectangle r) {
+		
+		for (Rectangle rTest : forbiddenRects) {
+			if (r.intersects(rTest)) return true;
+		}
+		return false;
+	}
+
+	@Override
+	public void beginRendering() {
+		forbiddenRects.clear();
+	}
+
+	@Override
+	public void finishRendering() {
+		// nothing to do currently		
 	}
 }
Index: applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfileLayer.java
===================================================================
--- applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfileLayer.java	(revision 23756)
+++ applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfileLayer.java	(revision 23757)
@@ -18,4 +18,5 @@
 
 import java.awt.Graphics2D;
+
 import javax.swing.Action;
 import javax.swing.Icon;
@@ -44,5 +45,5 @@
 	private IElevationProfile profile;
 	private IElevationProfileRenderer renderer = new DefaultElevationProfileRenderer();
-	private WayPoint selWayPoint = null;
+	private WayPoint selWayPoint = null;	
 
 	/**
@@ -158,4 +159,5 @@
 
 		if (profile != null) {
+			renderer.beginRendering();
 			for (WayPoint wpt : profile.getWayPoints()) {
 				int ele = (int) WayPointHelper.getElevation(wpt);
@@ -207,4 +209,6 @@
 			System.err.println("Layer#paint: No profile");
 		}
+		
+		renderer.finishRendering();
 	}
 
Index: applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/IElevationProfileRenderer.java
===================================================================
--- applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/IElevationProfileRenderer.java	(revision 23756)
+++ applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/IElevationProfileRenderer.java	(revision 23757)
@@ -50,3 +50,13 @@
 	 */
 	void renderWayPoint(Graphics g, IElevationProfile profile, MapView mv, WayPoint wpt, ElevationWayPointKind kind);
+	
+	/**
+	 * Notifies the renderer that rendering starts.
+	 */
+	void beginRendering();
+	
+	/**
+	 * Notifies the renderer that rendering has been finished.
+	 */
+	void finishRendering();
 }
