Index: trunk/src/org/openstreetmap/josm/data/imagery/TemplatedWMSTileSource.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/TemplatedWMSTileSource.java	(revision 8618)
+++ trunk/src/org/openstreetmap/josm/data/imagery/TemplatedWMSTileSource.java	(revision 8619)
@@ -15,5 +15,4 @@
 import java.util.regex.Pattern;
 
-import org.openstreetmap.gui.jmapviewer.Coordinate;
 import org.openstreetmap.gui.jmapviewer.OsmMercator;
 import org.openstreetmap.gui.jmapviewer.Tile;
@@ -169,47 +168,21 @@
 
     @Override
-    public double getDistance(double lat1, double lon1, double lat2, double lon2) {
-        throw new UnsupportedOperationException("Not implemented");
-    }
-
-    @Override
-    public int lonToX(double lon, int zoom) {
-        throw new UnsupportedOperationException("Not implemented");
-    }
-
-    @Override
-    public int latToY(double lat, int zoom) {
-        throw new UnsupportedOperationException("Not implemented");
-    }
-
-    @Override
-    public double XToLon(int x, int zoom) {
-        throw new UnsupportedOperationException("Not implemented");
-    }
-
-    @Override
-    public double YToLat(int y, int zoom) {
-        throw new UnsupportedOperationException("Not implemented");
-    }
-
-    @Override
-    public double latToTileY(double lat, int zoom) {
-        throw new UnsupportedOperationException("Not implemented");
-    }
-
-    @Override
-    public Coordinate tileXYToLatLon(Tile tile) {
+    public String getTileId(int zoom, int tilex, int tiley) {
+        return getTileUrl(zoom, tilex, tiley);
+    }
+
+    @Override
+    public ICoordinate tileXYToLatLon(Tile tile) {
         return tileXYToLatLon(tile.getXtile(), tile.getYtile(), tile.getZoom());
     }
 
     @Override
-    public Coordinate tileXYToLatLon(TileXY xy, int zoom) {
+    public ICoordinate tileXYToLatLon(TileXY xy, int zoom) {
         return tileXYToLatLon(xy.getXIndex(), xy.getYIndex(), zoom);
     }
 
     @Override
-    public Coordinate tileXYToLatLon(int x, int y, int zoom) {
-        LatLon ret = Main.getProjection().eastNorth2latlon(getTileEastNorth(x, y, zoom));
-        return new Coordinate(ret.lat(),  ret.lon());
+    public ICoordinate tileXYToLatLon(int x, int y, int zoom) {
+        return Main.getProjection().eastNorth2latlon(getTileEastNorth(x, y, zoom)).toCoordinate();
     }
 
@@ -268,10 +241,10 @@
 
     @Override
-    public Coordinate XYToLatLon(Point point, int zoom) {
+    public ICoordinate XYToLatLon(Point point, int zoom) {
         return XYToLatLon(point.x, point.y, zoom);
     }
 
     @Override
-    public Coordinate XYToLatLon(int x, int y, int zoom) {
+    public ICoordinate XYToLatLon(int x, int y, int zoom) {
         double scale = getDegreesPerTile(zoom) / getTileSize();
         Projection proj = Main.getProjection();
@@ -280,21 +253,5 @@
                 topLeftCorner.north() - y * scale
                 );
-        LatLon ll = proj.eastNorth2latlon(ret);
-        return new Coordinate(ll.lat(), ll.lon());
-    }
-
-    @Override
-    public double lonToTileX(double lon, int zoom) {
-        throw new UnsupportedOperationException("Not implemented");
-    }
-
-    @Override
-    public double tileXToLon(int x, int zoom) {
-        throw new UnsupportedOperationException("Not implemented");
-    }
-
-    @Override
-    public double tileYToLat(int y, int zoom) {
-        throw new UnsupportedOperationException("Not implemented");
+        return proj.eastNorth2latlon(ret).toCoordinate();
     }
 
@@ -302,4 +259,49 @@
     public Map<String, String> getHeaders() {
         return headers;
+    }
+
+    @Override
+    public double lonToTileX(double lon, int zoom) {
+        throw new UnsupportedOperationException("Not implemented");
+    }
+
+    @Override
+    public double tileXToLon(int x, int zoom) {
+        throw new UnsupportedOperationException("Not implemented");
+    }
+
+    @Override
+    public double tileYToLat(int y, int zoom) {
+        throw new UnsupportedOperationException("Not implemented");
+    }
+
+    @Override
+    public double getDistance(double lat1, double lon1, double lat2, double lon2) {
+        throw new UnsupportedOperationException("Not implemented");
+    }
+
+    @Override
+    public int lonToX(double lon, int zoom) {
+        throw new UnsupportedOperationException("Not implemented");
+    }
+
+    @Override
+    public int latToY(double lat, int zoom) {
+        throw new UnsupportedOperationException("Not implemented");
+    }
+
+    @Override
+    public double XToLon(int x, int zoom) {
+        throw new UnsupportedOperationException("Not implemented");
+    }
+
+    @Override
+    public double YToLat(int y, int zoom) {
+        throw new UnsupportedOperationException("Not implemented");
+    }
+
+    @Override
+    public double latToTileY(double lat, int zoom) {
+        throw new UnsupportedOperationException("Not implemented");
     }
 
@@ -378,8 +380,3 @@
         return bounds;
     }
-
-    @Override
-    public String getTileId(int zoom, int tilex, int tiley) {
-        return getTileUrl(zoom, tilex, tiley);
-    }
 }
