Index: applications/editors/josm/plugins/wmsplugin/src/wmsplugin/GeorefImage.java
===================================================================
--- applications/editors/josm/plugins/wmsplugin/src/wmsplugin/GeorefImage.java	(revision 17554)
+++ applications/editors/josm/plugins/wmsplugin/src/wmsplugin/GeorefImage.java	(revision 17556)
@@ -1,4 +1,5 @@
 package wmsplugin;
 
+import java.awt.Color;
 import java.awt.Dimension;
 import java.awt.Graphics;
Index: applications/editors/josm/plugins/wmsplugin/src/wmsplugin/Grabber.java
===================================================================
--- applications/editors/josm/plugins/wmsplugin/src/wmsplugin/Grabber.java	(revision 17554)
+++ applications/editors/josm/plugins/wmsplugin/src/wmsplugin/Grabber.java	(revision 17556)
@@ -10,4 +10,5 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.ProjectionBounds;
+import org.openstreetmap.josm.data.coor.EastNorth;
 import org.openstreetmap.josm.data.projection.Projection;
 import org.openstreetmap.josm.gui.MapView;
@@ -25,5 +26,18 @@
     Grabber(ProjectionBounds b, GeorefImage image, MapView mv, WMSLayer layer, CacheFiles cache)
     {
-        this.b = b;
+        if (b.min != null && b.max != null && WMSPlugin.doOverlap) { 
+            double eastSize =  b.max.east() - b.min.east(); 
+            double northSize =  b.max.north() - b.min.north(); 
+    
+            double eastCoef = WMSPlugin.overlapEast / 100.0; 
+            double northCoef = WMSPlugin.overlapNorth / 100.0; 
+             
+            this.b = new ProjectionBounds( new EastNorth(b.min.east(), 
+                                            b.min.north()), 
+                                 new EastNorth(b.max.east() + eastCoef * eastSize, 
+                                            b.max.north() + northCoef * northSize));             
+        } else 
+           this.b = b;
+
         this.proj = Main.proj;
         this.pixelPerDegree = layer.pixelPerDegree;
@@ -32,4 +46,5 @@
         this.layer = layer;
         this.cache = cache;
+
     }
 
Index: applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPlugin.java
===================================================================
--- applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPlugin.java	(revision 17554)
+++ applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPlugin.java	(revision 17556)
@@ -48,4 +48,8 @@
     static TreeMap<String,String> wmsListDefault = new TreeMap<String,String>();
 
+    static boolean doOverlap = false;
+    static int overlapEast = 14;
+    static int overlapNorth = 4;
+    
     // remember state of menu item to restore on changed preferences
     static private boolean menuEnabled = false;
@@ -90,4 +94,18 @@
         TreeSet<String> keys = new TreeSet<String>(prefs.keySet());
 
+        // Here we load the settings for "overlap" checkbox and spinboxes. 
+         
+        try { 
+            doOverlap = Boolean.valueOf(prefs.get("wmsplugin.url.overlap"));             
+        } catch (Exception e) {} // If sth fails, we drop to default settings. 
+ 
+        try { 
+            overlapEast = Integer.valueOf(prefs.get("wmsplugin.url.overlapEast"));             
+        } catch (Exception e) {} // If sth fails, we drop to default settings. 
+ 
+        try { 
+            overlapNorth = Integer.valueOf(prefs.get("wmsplugin.url.overlapNorth"));             
+        } catch (Exception e) {} // If sth fails, we drop to default settings. 
+
         // And then the names+urls of WMS servers
         int prefid = 0;
Index: applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPreferenceEditor.java
===================================================================
--- applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPreferenceEditor.java	(revision 17554)
+++ applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPreferenceEditor.java	(revision 17556)
@@ -1,4 +1,10 @@
 package wmsplugin;
 
+import java.awt.BorderLayout;
+import java.awt.FlowLayout;
+import javax.swing.JCheckBox;
+import javax.swing.JSpinner;
+import javax.swing.SpinnerNumberModel;
+import org.openstreetmap.josm.Main;
 import static org.openstreetmap.josm.tools.I18n.tr;
 
@@ -32,4 +38,8 @@
     private HashMap<Integer, WMSInfo> oldValues = new HashMap<Integer, WMSInfo>();
 
+    JCheckBox overlapCheckBox;
+    JSpinner spinEast;
+    JSpinner spinNorth;
+    
     public void addGui(final PreferenceDialog gui) {
         JPanel p = gui.createPreferenceTab("wms", tr("WMS Plugin Preferences"), tr("Modify list of WMS servers displayed in the WMS plugin menu"));
@@ -153,5 +163,24 @@
         browser.setSelectedItem(Main.pref.get("wmsplugin.browser", "webkit-image {0}"));
         p.add(new JLabel(tr("Downloader:")), GBC.eol().fill(GBC.HORIZONTAL));
-        p.add(browser, GBC.eol().fill(GBC.HORIZONTAL));
+        p.add(browser);
+
+
+        //Overlap
+        p.add(Box.createHorizontalGlue(), GBC.eol().fill(GBC.HORIZONTAL)); 
+         
+        overlapCheckBox = new JCheckBox(tr("Overlap tiles"), WMSPlugin.doOverlap ); 
+        JLabel labelEast = new JLabel(tr("% of east:")); 
+        JLabel labelNorth = new JLabel(tr("% of north:")); 
+        spinEast = new JSpinner(new SpinnerNumberModel(WMSPlugin.overlapEast, 1, 50, 1)); 
+        spinNorth = new JSpinner(new SpinnerNumberModel(WMSPlugin.overlapNorth, 1, 50, 1)); 
+         
+        JPanel overlapPanel = new JPanel(new FlowLayout()); 
+        overlapPanel.add(overlapCheckBox); 
+        overlapPanel.add(labelEast); 
+        overlapPanel.add(spinEast); 
+        overlapPanel.add(labelNorth); 
+        overlapPanel.add(spinNorth); 
+         
+        p.add(overlapPanel);	
     }
 
@@ -192,4 +221,12 @@
 
         if (change) WMSPlugin.refreshMenu();
+
+        WMSPlugin.doOverlap = overlapCheckBox.getModel().isSelected(); 
+        WMSPlugin.overlapEast = (Integer) spinEast.getModel().getValue(); 
+        WMSPlugin.overlapNorth = (Integer) spinNorth.getModel().getValue(); 
+         
+        Main.pref.put("wmsplugin.url.overlap",    String.valueOf(WMSPlugin.doOverlap)); 
+        Main.pref.put("wmsplugin.url.overlapEast", String.valueOf(WMSPlugin.overlapEast)); 
+        Main.pref.put("wmsplugin.url.overlapNorth", String.valueOf(WMSPlugin.overlapNorth)); 
 
         Main.pref.put("wmsplugin.browser", browser.getEditor().getItem().toString());
