Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/DefaultMapController.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/DefaultMapController.java	(revision 9289)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/DefaultMapController.java	(revision 9421)
@@ -42,5 +42,5 @@
 			int diffx = lastDragPoint.x - p.x;
 			int diffy = lastDragPoint.y - p.y;
-			map.move(diffx, diffy);
+			map.moveMap(diffx, diffy);
 		}
 		lastDragPoint = e.getPoint();
@@ -52,5 +52,5 @@
 	public void mouseClicked(MouseEvent e) {
 		if (doubleClickZoomEnabled && e.getClickCount() == 2 && e.getButton() == MouseEvent.BUTTON1)
-			map.setZoom(map.getZoom() + 1, e.getPoint());
+			map.zoomIn(e.getPoint());
 	}
 
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapController.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapController.java	(revision 9289)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapController.java	(revision 9421)
@@ -3,4 +3,5 @@
 //License: GPL. Copyright 2008 by Jan Peter Stotz
 
+import java.awt.event.MouseAdapter;
 import java.awt.event.MouseListener;
 import java.awt.event.MouseMotionListener;
@@ -19,5 +20,5 @@
  * @author Jan Peter Stotz
  */
-public abstract class JMapController {
+public abstract class JMapController extends MouseAdapter {
 
 	JMapViewer map;
@@ -25,10 +26,7 @@
 	public JMapController(JMapViewer map) {
 		this.map = map;
-		if (this instanceof MouseListener)
-			map.addMouseListener((MouseListener) this);
-		if (this instanceof MouseWheelListener)
-			map.addMouseWheelListener((MouseWheelListener) this);
-		if (this instanceof MouseMotionListener)
-			map.addMouseMotionListener((MouseMotionListener) this);
+		map.addMouseListener((MouseListener) this);
+		map.addMouseWheelListener((MouseWheelListener) this);
+		map.addMouseMotionListener((MouseMotionListener) this);
 	}
 
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java	(revision 9289)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java	(revision 9421)
@@ -12,5 +12,4 @@
 import java.awt.geom.Point2D;
 import java.awt.image.BufferedImage;
-import java.io.IOException;
 import java.io.InputStream;
 import java.net.HttpURLConnection;
@@ -101,6 +100,8 @@
 		setPreferredSize(new Dimension(400, 400));
 		try {
-			loadingImage = ImageIO.read(getClass().getResourceAsStream("images/hourglass.png"));
-		} catch (IOException e1) {
+			loadingImage =
+					ImageIO.read(JMapViewer.class.getResourceAsStream("images/hourglass.png"));
+		} catch (Exception e1) {
+			loadingImage = null;
 		}
 		setDisplayPositionByLatLon(50, 9, 3);
@@ -346,5 +347,5 @@
 			}
 		}
-		//g.drawString("Tiles in cache: " + tileCache.getTileCount(), 50, 20);
+		// g.drawString("Tiles in cache: " + tileCache.getTileCount(), 50, 20);
 		if (!mapMarkersVisible || mapMarkerList == null)
 			return;
@@ -365,5 +366,5 @@
 	 *            vertical movement in pixel
 	 */
-	public void move(int x, int y) {
+	public void moveMap(int x, int y) {
 		center.x += x;
 		center.y += y;
@@ -386,8 +387,22 @@
 
 	/**
+	 * Increases the current zoom level by one
+	 */
+	public void zoomIn(Point mapPoint) {
+		setZoom(zoom + 1, mapPoint);
+	}
+
+	/**
 	 * Decreases the current zoom level by one
 	 */
 	public void zoomOut() {
 		setZoom(zoom - 1);
+	}
+
+	/**
+	 * Decreases the current zoom level by one
+	 */
+	public void zoomOut(Point mapPoint) {
+		setZoom(zoom - 1, mapPoint);
 	}
 
@@ -436,10 +451,10 @@
 						return;
 					try {
-						//Thread.sleep(500);
+						// Thread.sleep(500);
 						URL url;
 						url = new URL("http://tile.openstreetmap.org/" + tile.getKey() + ".png");
 						HttpURLConnection urlConn = (HttpURLConnection) url.openConnection();
 						urlConn.setReadTimeout(30000); // 30 seconds read
-														// timeout
+						// timeout
 						input = urlConn.getInputStream();
 						tile.setImage(ImageIO.read(input));
