Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractOsmTileSource.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractOsmTileSource.java	(revision 26245)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractOsmTileSource.java	(revision 26249)
@@ -12,109 +12,34 @@
 import org.openstreetmap.gui.jmapviewer.interfaces.TileSource;
 
-public abstract class AbstractOsmTileSource implements TileSource {
-
-    protected String name;
-    protected String baseUrl;
-    protected String attrImgUrl;
-
+public abstract class AbstractOsmTileSource extends AbstractTSMTileSource {
     public AbstractOsmTileSource(String name, String base_url) {
-        this(name, base_url, null);
+        super(name, base_url);
     }
 
     public AbstractOsmTileSource(String name, String base_url, String attr_img_url) {
-        this.name = name;
-        this.baseUrl = base_url;
-        if(baseUrl.endsWith("/")) {
-            baseUrl = baseUrl.substring(0,baseUrl.length()-1);
-        }
-        attrImgUrl = attr_img_url;
+        super(name, base_url, attr_img_url);
     }
-
-    public String getName() {
-        return name;
-    }
-
     public int getMaxZoom() {
-        return 21;
-    }
-
-    public int getMinZoom() {
-        return 0;
-    }
-
-    public String getExtension() {
-        return "png";
-    }
-
-    /**
-     * @throws IOException when subclass cannot return the tile URL
-     */
-    public String getTilePath(int zoom, int tilex, int tiley) throws IOException {
-        return "/" + zoom + "/" + tilex + "/" + tiley + "." + getExtension();
-    }
-
-    public String getBaseUrl() {
-        return this.baseUrl;
-    }
-
-    public String getTileUrl(int zoom, int tilex, int tiley) throws IOException {
-        return this.getBaseUrl() + getTilePath(zoom, tilex, tiley);
+        return 18;
     }
 
     @Override
-    public String toString() {
-        return getName();
-    }
-
-    public String getTileType() {
-        return "png";
-    }
-
-    public int getTileSize() {
-        return 256;
-    }
-
-    public Image getAttributionImage() {
-        if (attrImgUrl != null)
-            return new ImageIcon(attrImgUrl).getImage();
-        else
-            return null;
-    }
-
     public boolean requiresAttribution() {
         return false;
     }
 
+    @Override
     public String getAttributionText(int zoom, Coordinate topLeft, Coordinate botRight) {
-        throw new UnsupportedOperationException("no attribution");
-        //return "\u00a9 OpenStreetMap contributors, CC-BY-SA ";
+        return "\u00a9 OpenStreetMap contributors, CC-BY-SA ";
     }
 
+    @Override
     public String getAttributionLinkURL() {
-        throw new UnsupportedOperationException("no attribution");
-        //return "http://openstreetmap.org/";
+        return "http://openstreetmap.org/";
     }
 
+    @Override
     public String getTermsOfUseURL() {
-        throw new UnsupportedOperationException("no attribution");
-        //return "http://www.openstreetmap.org/copyright";
-    }
-
-    public double latToTileY(double lat, int zoom) {
-        double l = lat / 180 * Math.PI;
-        double pf = Math.log(Math.tan(l) + (1 / Math.cos(l)));
-        return Math.pow(2.0, zoom - 1) * (Math.PI - pf) / Math.PI;
-    }
-
-    public double lonToTileX(double lon, int zoom) {
-        return Math.pow(2.0, zoom - 3) * (lon + 180.0) / 45.0;
-    }
-
-    public double tileYToLat(int y, int zoom) {
-        return Math.atan(Math.sinh(Math.PI - (Math.PI * y / Math.pow(2.0, zoom - 1)))) * 180 / Math.PI;
-    }
-
-    public double tileXToLon(int x, int zoom) {
-        return x * 45.0 / Math.pow(2.0, zoom - 3) - 180.0;
+        return "http://www.openstreetmap.org/copyright";
     }
 }
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTSMTileSource.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTSMTileSource.java	(revision 26249)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTSMTileSource.java	(revision 26249)
@@ -0,0 +1,117 @@
+/**
+ * 
+ */
+package org.openstreetmap.gui.jmapviewer.tilesources;
+
+import java.awt.Image;
+import java.io.IOException;
+
+import javax.swing.ImageIcon;
+
+import org.openstreetmap.gui.jmapviewer.Coordinate;
+import org.openstreetmap.gui.jmapviewer.interfaces.TileSource;
+
+public abstract class AbstractTSMTileSource implements TileSource {
+
+    protected String name;
+    protected String baseUrl;
+    protected String attrImgUrl;
+
+    public AbstractTSMTileSource(String name, String base_url) {
+        this(name, base_url, null);
+    }
+
+    public AbstractTSMTileSource(String name, String base_url, String attr_img_url) {
+        this.name = name;
+        this.baseUrl = base_url;
+        if(baseUrl.endsWith("/")) {
+            baseUrl = baseUrl.substring(0,baseUrl.length()-1);
+        }
+        attrImgUrl = attr_img_url;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public int getMaxZoom() {
+        return 21;
+    }
+
+    public int getMinZoom() {
+        return 0;
+    }
+
+    public String getExtension() {
+        return "png";
+    }
+
+    /**
+     * @throws IOException when subclass cannot return the tile URL
+     */
+    public String getTilePath(int zoom, int tilex, int tiley) throws IOException {
+        return "/" + zoom + "/" + tilex + "/" + tiley + "." + getExtension();
+    }
+
+    public String getBaseUrl() {
+        return this.baseUrl;
+    }
+
+    public String getTileUrl(int zoom, int tilex, int tiley) throws IOException {
+        return this.getBaseUrl() + getTilePath(zoom, tilex, tiley);
+    }
+
+    @Override
+    public String toString() {
+        return getName();
+    }
+
+    public String getTileType() {
+        return "png";
+    }
+
+    public int getTileSize() {
+        return 256;
+    }
+
+    public Image getAttributionImage() {
+        if (attrImgUrl != null)
+            return new ImageIcon(attrImgUrl).getImage();
+        else
+            return null;
+    }
+
+    public boolean requiresAttribution() {
+        return false;
+    }
+
+    public String getAttributionText(int zoom, Coordinate topLeft, Coordinate botRight) {
+        throw new UnsupportedOperationException("no attribution");
+    }
+
+    public String getAttributionLinkURL() {
+        throw new UnsupportedOperationException("no attribution");
+    }
+
+    public String getTermsOfUseURL() {
+        throw new UnsupportedOperationException("no attribution");
+    }
+
+    public double latToTileY(double lat, int zoom) {
+        double l = lat / 180 * Math.PI;
+        double pf = Math.log(Math.tan(l) + (1 / Math.cos(l)));
+        return Math.pow(2.0, zoom - 1) * (Math.PI - pf) / Math.PI;
+    }
+
+    public double lonToTileX(double lon, int zoom) {
+        return Math.pow(2.0, zoom - 3) * (lon + 180.0) / 45.0;
+    }
+
+    public double tileYToLat(int y, int zoom) {
+        return Math.atan(Math.sinh(Math.PI - (Math.PI * y / Math.pow(2.0, zoom - 1)))) * 180 / Math.PI;
+    }
+
+    public double tileXToLon(int x, int zoom) {
+        return x * 45.0 / Math.pow(2.0, zoom - 3) - 180.0;
+    }
+}
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/BingAerialTileSource.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/BingAerialTileSource.java	(revision 26245)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/BingAerialTileSource.java	(revision 26249)
@@ -30,5 +30,5 @@
 import org.xml.sax.SAXException;
 
-public class BingAerialTileSource extends AbstractOsmTileSource {
+public class BingAerialTileSource extends AbstractTSMTileSource {
     private static String API_KEY = "Arzdiw4nlOJzRwOz__qailc8NiR31Tt51dN2D7cm57NrnceZnCpgOkmJhNpGoppU";
     private static Future<List<Attribution>> attributions;
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/OsmTileSource.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/OsmTileSource.java	(revision 26245)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/OsmTileSource.java	(revision 26249)
@@ -11,13 +11,7 @@
         }
 
-        @Override
-        public int getMaxZoom() {
-            return 18;
-        }
-
         public TileUpdate getTileUpdate() {
             return TileUpdate.IfNoneMatch;
         }
-
     }
 
@@ -49,5 +43,4 @@
             return TileUpdate.LastModified;
         }
-
     }
 
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/ScanexTileSource.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/ScanexTileSource.java	(revision 26245)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/ScanexTileSource.java	(revision 26249)
@@ -5,5 +5,5 @@
 import org.openstreetmap.gui.jmapviewer.OsmMercator;
 
-public class ScanexTileSource extends AbstractOsmTileSource {
+public class ScanexTileSource extends AbstractTSMTileSource {
     private static String API_KEY = "4018C5A9AECAD8868ED5DEB2E41D09F7";
 
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TMSTileSource.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TMSTileSource.java	(revision 26245)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TMSTileSource.java	(revision 26249)
@@ -2,5 +2,5 @@
 
 
-public class TMSTileSource extends AbstractOsmTileSource {
+public class TMSTileSource extends AbstractTSMTileSource {
     protected int maxZoom;
     protected int minZoom = 0;
