Index: applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSGrabber.java
===================================================================
--- applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSGrabber.java	(revision 14063)
+++ applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSGrabber.java	(revision 14110)
@@ -14,4 +14,5 @@
 import java.text.DecimalFormat;
 import java.text.DecimalFormatSymbols;
+import java.text.MessageFormat;
 import java.text.NumberFormat;
 import java.util.Locale;
@@ -34,4 +35,5 @@
     protected Cache cache = new wmsplugin.Cache();
     private static Boolean shownWarning = false;
+    private boolean urlWithPatterns;
 
     WMSGrabber(String baseURL, Bounds b, Projection proj,
@@ -39,4 +41,6 @@
         super(b, proj, pixelPerDegree, image, mv, layer);
         this.baseURL = baseURL;
+        /* URL containing placeholders? */
+        urlWithPatterns = baseURL != null && baseURL.contains("{1}");
     }
 
@@ -74,13 +78,23 @@
             int wi, int ht) throws MalformedURLException {
         String str = baseURL;
-        if(!str.endsWith("?"))
-            str += "&";
-        str += "bbox="
-            + latLonFormat.format(w) + ","
-            + latLonFormat.format(s) + ","
-            + latLonFormat.format(e) + ","
-            + latLonFormat.format(n)
-            + getProjection(baseURL, false)
-            + "&width=" + wi + "&height=" + ht;
+        String bbox = latLonFormat.format(w) + "," +
+                      latLonFormat.format(s) + "," +
+                      latLonFormat.format(e) + "," +
+                      latLonFormat.format(n);
+
+        if (urlWithPatterns) {
+            String proj = Main.proj.toCode();
+            if(proj.equals("EPSG:3785")) // don't use mercator code
+                proj = "EPSG:4326";
+
+            str = MessageFormat.format(str, proj, bbox, wi, ht);
+        } else {
+            if(!str.endsWith("?"))
+                str += "&";
+            str += "bbox="
+                + bbox
+                + getProjection(baseURL, false)
+                + "&width=" + wi + "&height=" + ht;
+        }
         return new URL(str.replace(" ", "%20"));
     }
