Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/AttributionSupport.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/AttributionSupport.java	(revision 26805)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/AttributionSupport.java	(revision 26806)
@@ -16,9 +16,9 @@
 import java.util.HashMap;
 
-import org.openstreetmap.gui.jmapviewer.interfaces.TileSource;
+import org.openstreetmap.gui.jmapviewer.interfaces.Attributed;
 
 public class AttributionSupport {
 
-    private TileSource tileSource;
+    private Attributed source;
 
     private Image attrImage;
@@ -38,11 +38,11 @@
     }
 
-    public void initialize(TileSource tileSource) {
-        this.tileSource = tileSource;
-        boolean requireAttr = tileSource.requiresAttribution();
+    public void initialize(Attributed source) {
+        this.source = source;
+        boolean requireAttr = source.requiresAttribution();
         if (requireAttr) {
-            attrImage = tileSource.getAttributionImage();
-            attrTermsText = tileSource.getTermsOfUseText();
-            attrTermsUrl = tileSource.getTermsOfUseURL();
+            attrImage = source.getAttributionImage();
+            attrTermsText = source.getTermsOfUseText();
+            attrTermsUrl = source.getTermsOfUseURL();
             if (attrTermsUrl != null && attrTermsText == null) {
                 attrTermsText = tr("Background Terms of Use");
@@ -55,5 +55,5 @@
 
     public void paintAttribution(Graphics g, int width, int height, Coordinate topLeft, Coordinate bottomRight, int zoom, ImageObserver observer) {
-        if (tileSource == null || !tileSource.requiresAttribution())
+        if (source == null || !source.requiresAttribution())
             return;
         // Draw attribution
@@ -91,5 +91,5 @@
 
         g.setFont(ATTR_FONT);
-        String attributionText = tileSource.getAttributionText(zoom, topLeft, bottomRight);
+        String attributionText = source.getAttributionText(zoom, topLeft, bottomRight);
         if (attributionText != null) {
             Rectangle2D stringBounds = g.getFontMetrics().getStringBounds(attributionText, g);
@@ -108,5 +108,5 @@
 
     public boolean handleAttribution(Point p, boolean click) {
-        if (tileSource == null || !tileSource.requiresAttribution())
+        if (source == null || !source.requiresAttribution())
             return false;
 
@@ -114,5 +114,5 @@
 
         if (attrTextBounds != null && attrTextBounds.contains(p)) {
-            String attributionURL = tileSource.getAttributionLinkURL();
+            String attributionURL = source.getAttributionLinkURL();
             if (attributionURL != null) {
                 if (click) {
@@ -122,13 +122,13 @@
             }
         } else if (attrImageBounds != null && attrImageBounds.contains(p)) {
-            String attributionImageURL = tileSource.getAttributionImageURL();
+            String attributionImageURL = source.getAttributionImageURL();
             if (attributionImageURL != null) {
                 if (click) {
-                    FeatureAdapter.openLink(tileSource.getAttributionImageURL());
+                    FeatureAdapter.openLink(source.getAttributionImageURL());
                 }
                 return true;
             }
         } else if (attrToUBounds != null && attrToUBounds.contains(p)) {
-            String termsOfUseURL = tileSource.getTermsOfUseURL();
+            String termsOfUseURL = source.getTermsOfUseURL();
             if (termsOfUseURL != null) {
                 if (click) {
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/Attributed.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/Attributed.java	(revision 26806)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/Attributed.java	(revision 26806)
@@ -0,0 +1,51 @@
+package org.openstreetmap.gui.jmapviewer.interfaces;
+
+import java.awt.Image;
+
+import org.openstreetmap.gui.jmapviewer.Coordinate;
+
+//License: GPL.
+
+public interface Attributed {
+    /**
+     * @return True if the tile source requires attribution in text or image form.
+     */
+    boolean requiresAttribution();
+
+    /**
+     * @param zoom The optional zoom level for the view.
+     * @param botRight The bottom right of the bounding box for attribution.
+     * @param topLeft The top left of the bounding box for attribution.
+     * @return Attribution text for the image source.
+     */
+    String getAttributionText(int zoom, Coordinate topLeft, Coordinate botRight);
+
+    /**
+     * @return The URL to open when the user clicks the attribution text.
+     */
+    String getAttributionLinkURL();
+
+    /**
+     * @return The URL for the attribution image. Null if no image should be displayed.
+     */
+    Image getAttributionImage();
+
+    /**
+     * @return The URL to open when the user clicks the attribution image.
+     * When return value is null, the image is still displayed (provided getAttributionImage()
+     * returns a value other than null), but the image does not link to a website.
+     */
+    String getAttributionImageURL();
+
+    /**
+     * @return The attribution "Terms of Use" text.
+     * In case it returns null, but getTermsOfUseURL() is not null, a default
+     * terms of use text is used.
+     */
+    String getTermsOfUseText();
+
+    /**
+     * @return The URL to open when the user clicks the attribution "Terms of Use" text.
+     */
+    String getTermsOfUseURL();
+}
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileSource.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileSource.java	(revision 26805)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileSource.java	(revision 26806)
@@ -13,5 +13,5 @@
  * @author Jan Peter Stotz
  */
-public interface TileSource {
+public interface TileSource extends Attributed {
 
     /**
@@ -97,46 +97,4 @@
     int getTileSize();
 
-    /**
-     * @return True if the tile source requires attribution in text or image form.
-     */
-    boolean requiresAttribution();
-
-    /**
-     * @param zoom The optional zoom level for the view.
-     * @param botRight The bottom right of the bounding box for attribution.
-     * @param topLeft The top left of the bounding box for attribution.
-     * @return Attribution text for the image source.
-     */
-    String getAttributionText(int zoom, Coordinate topLeft, Coordinate botRight);
-
-    /**
-     * @return The URL to open when the user clicks the attribution text.
-     */
-    String getAttributionLinkURL();
-
-    /**
-     * @return The URL for the attribution image. Null if no image should be displayed.
-     */
-    Image getAttributionImage();
-
-    /**
-     * @return The URL to open when the user clicks the attribution image.
-     * When return value is null, the image is still displayed (provided getAttributionImage()
-     * returns a value other than null), but the image does not link to a website.
-     */
-    String getAttributionImageURL();
-
-    /**
-     * @return The attribution "Terms of Use" text.
-     * In case it returns null, but getTermsOfUseURL() is not null, a default
-     * terms of use text is used.
-     */
-    String getTermsOfUseText();
-
-    /**
-     * @return The URL to open when the user clicks the attribution "Terms of Use" text.
-     */
-    String getTermsOfUseURL();
-
     double latToTileY(double lat, int zoom);
 
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractOsmTileSource.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractOsmTileSource.java	(revision 26805)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractOsmTileSource.java	(revision 26806)
@@ -17,7 +17,4 @@
     }
 
-    public AbstractOsmTileSource(String name, String base_url, String attr_img_url) {
-        super(name, base_url, attr_img_url);
-    }
     public int getMaxZoom() {
         return 18;
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTSMTileSource.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTSMTileSource.java	(revision 26805)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTSMTileSource.java	(revision 26806)
@@ -1,6 +1,5 @@
-/**
- * 
- */
 package org.openstreetmap.gui.jmapviewer.tilesources;
+
+//License: GPL.
 
 import java.awt.Image;
@@ -12,15 +11,10 @@
 import org.openstreetmap.gui.jmapviewer.interfaces.TileSource;
 
-public abstract class AbstractTSMTileSource implements TileSource {
+public abstract class AbstractTSMTileSource extends AbstractTileSource {
 
     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;
@@ -28,5 +22,4 @@
             baseUrl = baseUrl.substring(0,baseUrl.length()-1);
         }
-        attrImgUrl = attr_img_url;
     }
 
@@ -82,43 +75,4 @@
 
     @Override
-    public boolean requiresAttribution() {
-        return false;
-    }
-
-    @Override
-    public String getAttributionText(int zoom, Coordinate topLeft, Coordinate botRight) {
-        throw new UnsupportedOperationException("no attribution");
-    }
-
-    @Override
-    public String getAttributionLinkURL() {
-        throw new UnsupportedOperationException("no attribution");
-    }
-
-    @Override
-    public Image getAttributionImage() {
-        if (attrImgUrl != null)
-            return new ImageIcon(attrImgUrl).getImage();
-
-        else
-            return null;
-    }
-
-    @Override
-    public String getAttributionImageURL() {
-        throw new UnsupportedOperationException("no attribution");
-    }
-
-    @Override
-    public String getTermsOfUseText() {
-        throw new UnsupportedOperationException("no attribution");
-    }
-
-    @Override
-    public String getTermsOfUseURL() {
-        throw new UnsupportedOperationException("no attribution");
-    }
-
-    @Override
     public double latToTileY(double lat, int zoom) {
         double l = lat / 180 * Math.PI;
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTileSource.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTileSource.java	(revision 26806)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTileSource.java	(revision 26806)
@@ -0,0 +1,78 @@
+package org.openstreetmap.gui.jmapviewer.tilesources;
+
+import java.awt.Image;
+
+import org.openstreetmap.gui.jmapviewer.interfaces.TileSource;
+import org.openstreetmap.gui.jmapviewer.Coordinate;
+
+//License: GPL. Copyright 2008 by Jan Peter Stotz
+
+abstract public class AbstractTileSource implements TileSource {
+
+    protected String attributionText;
+    protected String attributionLinkURL;
+    protected Image attributionImage;
+    protected String attributionImageURL;
+    protected String termsOfUseText;
+    protected String termsOfUseURL;
+
+    @Override
+    public boolean requiresAttribution() {
+        return attributionText != null || attributionImage != null || termsOfUseText != null || termsOfUseURL != null;
+    }
+
+    @Override
+    public String getAttributionText(int zoom, Coordinate topLeft, Coordinate botRight) {
+        return attributionText;
+    }
+
+    @Override
+    public String getAttributionLinkURL() {
+        return attributionLinkURL;
+    }
+
+    @Override
+    public Image getAttributionImage() {
+        return attributionImage;
+    }
+
+    @Override
+    public String getAttributionImageURL() {
+        return attributionImageURL;
+    }
+
+    @Override
+    public String getTermsOfUseText() {
+        return termsOfUseText;
+    }
+
+    @Override
+    public String getTermsOfUseURL() {
+        return termsOfUseURL;
+    }
+
+    public void setAttributionText(String attributionText) {
+        this.attributionText = attributionText;
+    }
+
+    public void setAttributionLinkURL(String attributionLinkURL) {
+        this.attributionLinkURL = attributionLinkURL;
+    }
+
+    public void setAttributionImage(Image attributionImage) {
+        this.attributionImage = attributionImage;
+    }
+
+    public void setAttributionImageURL(String attributionImageURL) {
+        this.attributionImageURL = attributionImageURL;
+    }
+
+    public void setTermsOfUseText(String termsOfUseText) {
+        this.termsOfUseText = termsOfUseText;
+    }
+
+    public void setTermsOfUseURL(String termsOfUseURL) {
+        this.termsOfUseURL = termsOfUseURL;
+    }
+
+}
Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TMSTileSource.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TMSTileSource.java	(revision 26805)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TMSTileSource.java	(revision 26806)
@@ -8,12 +8,7 @@
 
 public class TMSTileSource extends AbstractTSMTileSource {
+
     protected int maxZoom;
     protected int minZoom = 0;
-    protected String attributionText;
-    protected String attributionLinkURL;
-    protected Image attributionImage;
-    protected String attributionImageURL;
-    protected String termsOfUseText;
-    protected String termsOfUseURL;
 
     public TMSTileSource(String name, String url, int maxZoom) {
@@ -42,61 +37,3 @@
     }
 
-    @Override
-    public boolean requiresAttribution() {
-        return attributionText != null;
-    }
-
-    @Override
-    public String getAttributionText(int zoom, Coordinate topLeft, Coordinate botRight) {
-        return attributionText;
-    }
-
-    @Override
-    public String getAttributionLinkURL() {
-        return attributionLinkURL;
-    }
-
-    @Override
-    public Image getAttributionImage() {
-        return attributionImage;
-    }
-
-    @Override
-    public String getAttributionImageURL() {
-        return attributionImageURL;
-    }
-
-    @Override
-    public String getTermsOfUseText() {
-        return termsOfUseText;
-    }
-
-    @Override
-    public String getTermsOfUseURL() {
-        return termsOfUseURL;
-    }
-
-    public void setAttributionText(String text) {
-        attributionText = text;
-    }
-
-    public void setAttributionLinkURL(String text) {
-        attributionLinkURL = text;
-    }
-
-    public void setAttributionImage(Image img) {
-        attributionImage = img;
-    }
-
-    public void setAttributionImageURL(String text) {
-        attributionImageURL = text;
-    }
-
-    public void setTermsOfUseText(String text) {
-        termsOfUseText = text;
-    }
-
-    public void setTermsOfUseURL(String text) {
-        termsOfUseURL = text;
-    }
 }
