Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java	(revision 19870)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java	(revision 22281)
@@ -73,4 +73,6 @@
     protected JButton zoomOutButton;
 
+    private TileSource tileSource;
+
     /**
      * Creates a standard {@link JMapViewer} instance that can be controlled via
@@ -87,5 +89,6 @@
     public JMapViewer(TileCache tileCache, int downloadThreadCount) {
         super();
-        tileController = new TileController(new OsmTileSource.Mapnik(), tileCache, this);
+        tileSource = new OsmTileSource.Mapnik();
+        tileController = new TileController(tileSource, tileCache, this);
         mapMarkerList = new LinkedList<MapMarker>();
         mapRectangleList = new LinkedList<MapRectangle>();
@@ -95,5 +98,5 @@
         setLayout(null);
         initializeZoomSlider();
-        setMinimumSize(new Dimension(Tile.SIZE, Tile.SIZE));
+        setMinimumSize(new Dimension(tileSource.getTileSize(), tileSource.getTileSize()));
         setPreferredSize(new Dimension(400, 400));
         setDisplayPositionByLatLon(50, 9, 3);
@@ -357,7 +360,6 @@
         y -= center.y - getHeight() / 2;
         if (checkOutside) {
-            if (x < 0 || y < 0 || x > getWidth() || y > getHeight()) {
+            if (x < 0 || y < 0 || x > getWidth() || y > getHeight())
                 return null;
-            }
         }
         return new Point(x, y);
@@ -382,9 +384,8 @@
      */
     public Point getMapPosition(Coordinate coord) {
-        if (coord != null) {
+        if (coord != null)
             return getMapPosition(coord.getLat(), coord.getLon());
-        } else {
+        else
             return null;
-        }
     }
 
@@ -397,9 +398,8 @@
      */
     public Point getMapPosition(Coordinate coord, boolean checkOutside) {
-        if (coord != null) {
+        if (coord != null)
             return getMapPosition(coord.getLat(), coord.getLon(), checkOutside);
-        } else {
+        else
             return null;
-        }
     }
 
@@ -410,8 +410,9 @@
         int iMove = 0;
 
-        int tilex = center.x / Tile.SIZE;
-        int tiley = center.y / Tile.SIZE;
-        int off_x = (center.x % Tile.SIZE);
-        int off_y = (center.y % Tile.SIZE);
+        int tilesize = tileSource.getTileSize();
+        int tilex = center.x / tilesize;
+        int tiley = center.y / tilesize;
+        int off_x = (center.x % tilesize);
+        int off_y = (center.y % tilesize);
 
         int w2 = getWidth() / 2;
@@ -421,7 +422,7 @@
 
         int diff_left = off_x;
-        int diff_right = Tile.SIZE - off_x;
+        int diff_right = tilesize - off_x;
         int diff_top = off_y;
-        int diff_bottom = Tile.SIZE - off_y;
+        int diff_bottom = tilesize - off_y;
 
         boolean start_left = diff_left < diff_right;
@@ -429,16 +430,18 @@
 
         if (start_top) {
-            if (start_left)
+            if (start_left) {
                 iMove = 2;
-            else
+            } else {
                 iMove = 3;
+            }
         } else {
-            if (start_left)
+            if (start_left) {
                 iMove = 1;
-            else
+            } else {
                 iMove = 0;
+            }
         } // calculate the visibility borders
-        int x_min = -Tile.SIZE;
-        int y_min = -Tile.SIZE;
+        int x_min = -tilesize;
+        int y_min = -tilesize;
         int x_max = getWidth();
         int y_max = getHeight();
@@ -450,6 +453,7 @@
             painted = false;
             for (int i = 0; i < 4; i++) {
-                if (i % 2 == 0)
+                if (i % 2 == 0) {
                     x++;
+                }
                 for (int j = 0; j < x; j++) {
                     if (x_min <= posx && posx <= x_max && y_min <= posy && posy <= y_max) {
@@ -459,11 +463,12 @@
                             painted = true;
                             tile.paint(g, posx, posy);
-                            if (tileGridVisible)
-                                g.drawRect(posx, posy, Tile.SIZE, Tile.SIZE);
+                            if (tileGridVisible) {
+                                g.drawRect(posx, posy, tilesize, tilesize);
+                            }
                         }
                     }
                     Point p = move[iMove];
-                    posx += p.x * Tile.SIZE;
-                    posy += p.y * Tile.SIZE;
+                    posx += p.x * tilesize;
+                    posy += p.y * tilesize;
                     tilex += p.x;
                     tiley += p.y;
@@ -473,5 +478,5 @@
         }
         // outer border of the map
-        int mapSize = Tile.SIZE << zoom;
+        int mapSize = tilesize << zoom;
         g.drawRect(w2 - center.x, h2 - center.y, mapSize, mapSize);
 
@@ -666,4 +671,5 @@
         if (tileSource.getMinZoom() < MIN_ZOOM)
             throw new RuntimeException("Minumim zoom level too low");
+        this.tileSource = tileSource;
         tileController.setTileSource(tileSource);
         zoomSlider.setMinimum(tileSource.getMinZoom());
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileSource.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileSource.java	(revision 19870)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileSource.java	(revision 22281)
@@ -54,4 +54,7 @@
         }
 
+        public int getTileSize() {
+            return 256;
+        }
     }
 
@@ -86,4 +89,5 @@
         }
 
+        @Override
         public int getMaxZoom() {
             return 17;
@@ -103,4 +107,5 @@
         }
 
+        @Override
         public int getMaxZoom() {
             return 17;
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Tile.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Tile.java	(revision 19870)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Tile.java	(revision 22281)
@@ -48,5 +48,4 @@
     protected boolean loading = false;
     protected boolean error = false;
-    public static final int SIZE = 256;
 
     /**
@@ -79,5 +78,5 @@
      */
     public void loadPlaceholderFromCache(TileCache cache) {
-        BufferedImage tmpImage = new BufferedImage(SIZE, SIZE, BufferedImage.TYPE_INT_RGB);
+        BufferedImage tmpImage = new BufferedImage(source.getTileSize(), source.getTileSize(), BufferedImage.TYPE_INT_RGB);
         Graphics2D g = (Graphics2D) tmpImage.getGraphics();
         // g.drawImage(image, 0, 0, null);
@@ -98,5 +97,5 @@
                         if (tile != null && tile.isLoaded()) {
                             paintedTileCount++;
-                            tile.paint(g, x * SIZE, y * SIZE);
+                            tile.paint(g, x * source.getTileSize(), y * source.getTileSize());
                         }
                     }
@@ -115,6 +114,6 @@
                 double scale = factor;
                 AffineTransform at = new AffineTransform();
-                int translate_x = (xtile % factor) * SIZE;
-                int translate_y = (ytile % factor) * SIZE;
+                int translate_x = (xtile % factor) * source.getTileSize();
+                int translate_y = (ytile % factor) * source.getTileSize();
                 at.setTransform(scale, 0, 0, scale, -translate_x, -translate_y);
                 g.setTransform(at);
@@ -211,7 +210,7 @@
 
     /**
-     * Note that the hash code does not include the {@link #source}. 
+     * Note that the hash code does not include the {@link #source}.
      * Therefore a hash based collection can only contain tiles
-     * of one {@link #source}. 
+     * of one {@link #source}.
      */
     @Override
@@ -226,6 +225,6 @@
 
     /**
-     * Compares this object with <code>obj</code> based on 
-     * the fields {@link #xtile}, {@link #ytile} and 
+     * Compares this object with <code>obj</code> based on
+     * the fields {@link #xtile}, {@link #ytile} and
      * {@link #zoom}.
      * The {@link #source} field is ignored.
@@ -255,10 +254,13 @@
     public String getStatus() {
         String status = "new";
-        if (this.loading)
+        if (this.loading) {
             status = "loading";
-        if (this.loaded)
+        }
+        if (this.loaded) {
             status = "loaded";
-        if (this.error)
+        }
+        if (this.error) {
             status = "error";
+        }
         return status;
     }
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileSource.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileSource.java	(revision 19870)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileSource.java	(revision 22281)
@@ -86,3 +86,9 @@
      */
     public String getTileType();
+
+    /**
+     * Specifies how large each tile is.
+     * @return The size of a single tile in pixels.
+     */
+    public int getTileSize();
 }
