Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java	(revision 19232)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java	(revision 19697)
@@ -10,4 +10,5 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
+import java.awt.event.MouseEvent;
 import java.util.LinkedList;
 import java.util.List;
@@ -28,10 +29,10 @@
 
 /**
- *
+ * 
  * Provides a simple panel that displays pre-rendered map tiles loaded from the
  * OpenStreetMap project.
- *
+ * 
  * @author Jan Peter Stotz
- *
+ * 
  */
 public class JMapViewer extends JPanel implements TileLoaderListener {
@@ -97,4 +98,12 @@
         setPreferredSize(new Dimension(400, 400));
         setDisplayPositionByLatLon(50, 9, 3);
+        //setToolTipText("");
+    }
+
+    @Override
+    public String getToolTipText(MouseEvent event) {
+        //        Point screenPoint = event.getLocationOnScreen();
+        //        Coordinate c = getPosition(screenPoint);
+        return super.getToolTipText(event);
     }
 
@@ -148,5 +157,5 @@
      * Changes the map pane so that it is centered on the specified coordinate
      * at the given zoom level.
-     *
+     * 
      * @param lat
      *            latitude of the specified coordinate
@@ -164,5 +173,5 @@
      * level is displayed on the map at the screen coordinate
      * <code>mapPoint</code>.
-     *
+     * 
      * @param mapPoint
      *            point on the map denoted in pixels where the coordinate should
@@ -292,4 +301,10 @@
     }
 
+    /**
+     * Calculates the latitude/longitude coordinate of the center of the
+     * currently displayed map area.
+     * 
+     * @return latitude / longitude
+     */
     public Coordinate getPosition() {
         double lon = OsmMercator.XToLon(center.x, zoom);
@@ -298,12 +313,25 @@
     }
 
+    /**
+     * Converts the relative pixel coordinate (regarding the top left corner of
+     * the displayed map) into a latitude / longitude coordinate
+     * 
+     * @param mapPoint
+     *            relative pixel coordinate regarding the top left corner of the
+     *            displayed map
+     * @return latitude / longitude
+     */
     public Coordinate getPosition(Point mapPoint) {
-        int x = center.x + mapPoint.x - getWidth() / 2;
-        int y = center.y + mapPoint.y - getHeight() / 2;
-        double lon = OsmMercator.XToLon(x, zoom);
-        double lat = OsmMercator.YToLat(y, zoom);
-        return new Coordinate(lat, lon);
-    }
-
+        return getPosition(mapPoint.x, mapPoint.y);
+    }
+
+    /**
+     * Converts the relative pixel coordinate (regarding the top left corner of
+     * the displayed map) into a latitude / longitude coordinate
+     * 
+     * @param mapPointX
+     * @param mapPointY
+     * @return
+     */
     public Coordinate getPosition(int mapPointX, int mapPointY) {
         int x = center.x + mapPointX - getWidth() / 2;
@@ -316,9 +344,10 @@
     /**
      * Calculates the position on the map of a given coordinate
-     *
+     * 
      * @param lat
      * @param lon
      * @param checkOutside
-     * @return point on the map or <code>null</code> if the point is not visible and checkOutside set to <code>true</code>
+     * @return point on the map or <code>null</code> if the point is not visible
+     *         and checkOutside set to <code>true</code>
      */
     public Point getMapPosition(double lat, double lon, boolean checkOutside) {
@@ -337,5 +366,5 @@
     /**
      * Calculates the position on the map of a given coordinate
-     *
+     * 
      * @param lat
      * @param lon
@@ -348,5 +377,5 @@
     /**
      * Calculates the position on the map of a given coordinate
-     *
+     * 
      * @param coord
      * @return point on the map or <code>null</code> if the point is not visible
@@ -362,7 +391,8 @@
     /**
      * Calculates the position on the map of a given coordinate
-     *
+     * 
      * @param coord
-     * @return point on the map or <code>null</code> if the point is not visible and checkOutside set to <code>true</code>
+     * @return point on the map or <code>null</code> if the point is not visible
+     *         and checkOutside set to <code>true</code>
      */
     public Point getMapPosition(Coordinate coord, boolean checkOutside) {
@@ -474,5 +504,5 @@
     /**
      * Moves the visible map pane.
-     *
+     * 
      * @param x
      *            horizontal movement in pixel.
@@ -539,5 +569,5 @@
      * derived implementations for adapting zoom dependent values. The new zoom
      * level can be obtained via {@link #getZoom()}.
-     *
+     * 
      * @param oldZoom
      *            the previous zoom level
@@ -566,5 +596,5 @@
     /**
      * Enables or disables painting of the {@link MapMarker}
-     *
+     * 
      * @param mapMarkersVisible
      * @see #addMapMarker(MapMarker)
@@ -643,5 +673,5 @@
     /**
      * Enables or disables painting of the {@link MapRectangle}
-     *
+     * 
      * @param mapMarkersVisible
      * @see #addMapRectangle(MapRectangle)
@@ -653,6 +683,10 @@
     }
 
-    /* (non-Javadoc)
-     * @see org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener#getTileCache()
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener#getTileCache
+     * ()
      */
     public TileCache getTileCache() {
