Index: applications/editors/josm/plugins/slippy_map_chooser/src/SlippyMapChooser.java
===================================================================
--- applications/editors/josm/plugins/slippy_map_chooser/src/SlippyMapChooser.java	(revision 9785)
+++ applications/editors/josm/plugins/slippy_map_chooser/src/SlippyMapChooser.java	(revision 9819)
@@ -21,6 +21,7 @@
 import org.openstreetmap.gui.jmapviewer.MemoryTileCache;
 import org.openstreetmap.gui.jmapviewer.OsmMercator;
-import org.openstreetmap.gui.jmapviewer.OsmTileLoader;
+import org.openstreetmap.gui.jmapviewer.OsmTileSource;
 import org.openstreetmap.gui.jmapviewer.interfaces.MapMarker;
+import org.openstreetmap.gui.jmapviewer.interfaces.TileSource;
 import org.openstreetmap.josm.gui.download.DownloadDialog;
 import org.openstreetmap.josm.gui.download.DownloadSelection;
@@ -48,4 +49,6 @@
 	// screen size
 	private Dimension iScreenSize;
+
+	private TileSource[] sources = { new OsmTileSource.Mapnik(), new OsmTileSource.TilesAtHome() };
 
 	/**
@@ -203,5 +206,5 @@
 			int h = iScreenSize.height * 90 / 100;
 			co.setBounds((iScreenSize.width - w) / 2, (iScreenSize.height - h) / 2, w, h);
-			
+
 		}
 		// shrink
@@ -212,18 +215,17 @@
 			int h = iDownloadDialogDimension.height;
 			co.setBounds((iScreenSize.width - w) / 2, (iScreenSize.height - h) / 2, w, h);
-			
-		}
-		
+
+		}
+
 		repaint();
 	}
-	
-	public void toggleMapSource(int mapSource){
+
+	public void toggleMapSource(int mapSource) {
 		this.tileCache = new MemoryTileCache();
-		if(mapSource == SourceButton.MAPNIK){
-			this.tileLoader = new OsmTileLoader(this,OsmTileLoader.MAP_MAPNIK);
-		}else{
-			this.tileLoader = new OsmTileLoader(this,OsmTileLoader.MAP_OSMA);
-		}
-		repaint();
+		if (mapSource == SourceButton.MAPNIK) {
+			this.setTileSource(sources[0]);
+		} else {
+			this.setTileSource(sources[1]);
+		}
 	}
 
Index: applications/editors/josm/plugins/slippy_map_chooser/src/SourceButton.java
===================================================================
--- applications/editors/josm/plugins/slippy_map_chooser/src/SourceButton.java	(revision 9785)
+++ applications/editors/josm/plugins/slippy_map_chooser/src/SourceButton.java	(revision 9819)
@@ -1,97 +1,87 @@
-import java.awt.Color;
 import java.awt.Graphics;
 import java.awt.Point;
 
 import javax.swing.ImageIcon;
-import javax.vecmath.Color3f;
 
 import org.openstreetmap.josm.tools.ImageProvider;
 
+public class SourceButton {
 
+	private int x = 0;
+	private int y = 30;
 
-
-public class SourceButton {
-	
-	private int x =0;
-	private int y = 30;	
-	
-	private int enlagedWidth = 200;
-	private int enlargedHeight = 50;
-	
 	private ImageIcon enlargeImage;
 	private ImageIcon shrinkImage;
 	private ImageIcon imageMapnik;
 	private ImageIcon imageOsmarender;
-	
+
 	private boolean isEnlarged = false;
-	
+
 	private boolean isMapnik = true;
-	
-	private static final String SOURCE_1 = "Osmarender";
-	private static final String SOURCE_2 = "Mapnik";
-	
+
 	public static final int HIDE_OR_SHOW = 1;
 	public static final int MAPNIK = 2;
 	public static final int OSMARENDER = 3;
-	
-	
-	public SourceButton(){
+
+	public SourceButton() {
 		enlargeImage = ImageProvider.get("", "layer-switcher-maximize.png");
-		shrinkImage = ImageProvider.get("", "layer-switcher-minimize.png");	
+		shrinkImage = ImageProvider.get("", "layer-switcher-minimize.png");
 		imageMapnik = ImageProvider.get("", "blue_Mapnik.png");
 		imageOsmarender = ImageProvider.get("", "blue_Osmarender.png");
+	}
+
+	public void paint(Graphics g) {
+
+		if (isEnlarged) {
+			if (isMapnik) {
+				g.drawImage(imageMapnik.getImage(), g.getClipBounds().width
+						- imageMapnik.getIconWidth(), y, null);
+			} else {
+				g.drawImage(imageOsmarender.getImage(), g.getClipBounds().width
+						- imageMapnik.getIconWidth(), y, null);
+			}
+
+			if (shrinkImage != null) {
+				this.x = g.getClipBounds().width - shrinkImage.getIconWidth();
+				g.drawImage(shrinkImage.getImage(), x, y, null);
+			}
+
+		} else {
+			if (enlargeImage != null) {
+				this.x = g.getClipBounds().width - enlargeImage.getIconWidth();
+				g.drawImage(enlargeImage.getImage(), x, y, null);
+			}
+		}
+	}
+
+	public void toggle() {
+		this.isEnlarged = !this.isEnlarged;
 
 	}
-	
-	public void paint(Graphics g){
-		
-		if(isEnlarged){
-			if(isMapnik){
-				g.drawImage(imageMapnik.getImage(), g.getClipBounds().width - imageMapnik.getIconWidth(), y, null);
-			}else{
-				g.drawImage(imageOsmarender.getImage(), g.getClipBounds().width - imageMapnik.getIconWidth(), y, null);
-			}
 
-			if(shrinkImage != null){
-				this.x = g.getClipBounds().width-shrinkImage.getIconWidth();				
-				g.drawImage(shrinkImage.getImage(),x,y, null);			
-			}
-		
-		}else{
-			if(enlargeImage != null){
-				this.x = g.getClipBounds().width-enlargeImage.getIconWidth();
-				g.drawImage(enlargeImage.getImage(),x,y, null);
-			}
-		}		
-	}
-	
-	public void toggle(){
-		this.isEnlarged = !this.isEnlarged;
-				
-	}
-	
-	public int hit(Point point){		
-		if(isEnlarged){
-			if(x < point.x && point.x < x + shrinkImage.getIconWidth()){
-				if(y < point.y && point.y < y + shrinkImage.getIconHeight() ){				
+	public int hit(Point point) {
+		if (isEnlarged) {
+			if (x < point.x && point.x < x + shrinkImage.getIconWidth()) {
+				if (y < point.y && point.y < y + shrinkImage.getIconHeight()) {
 					return HIDE_OR_SHOW;
 				}
-			}else if(x-imageMapnik.getIconWidth() < point.x && point.x < x ){
-				 if(y < point.y && point.y < y +imageMapnik.getIconHeight()/2 ){
+			} else if (x - imageMapnik.getIconWidth() < point.x && point.x < x) {
+				if (y < point.y && point.y < y + imageMapnik.getIconHeight() / 2) {
 					isMapnik = false;
 					return OSMARENDER;
-				}else if(y+imageMapnik.getIconHeight()/2 < point.y && point.y < y +imageMapnik.getIconHeight() ){
+				} else if (y + imageMapnik.getIconHeight() / 2 < point.y
+						&& point.y < y + imageMapnik.getIconHeight()) {
 					isMapnik = true;
 					return MAPNIK;
 				}
 			}
-		}else{
-			if(x < point.x && point.x < x + enlargeImage.getIconWidth()){
-				if(y < point.y && point.y < y + enlargeImage.getIconHeight() ){				
+		} else {
+			if (x < point.x && point.x < x + enlargeImage.getIconWidth()) {
+				if (y < point.y && point.y < y + enlargeImage.getIconHeight()) {
 					return HIDE_OR_SHOW;
 				}
 			}
 		}
-		
+
 		return 0;
 	}
