Index: applications/viewer/jmapviewer/build.xml
===================================================================
--- applications/viewer/jmapviewer/build.xml	(revision 36432)
+++ applications/viewer/jmapviewer/build.xml	(revision 36433)
@@ -183,5 +183,5 @@
         <!-- resolver.repositories makes it global -->
         <mvn:remoterepos id="resolver.repositories">
-            <mvn:remoterepo id="JOSM-central" url="https://josm.openstreetmap.de/nexus/content/repositories/central/" />
+            <mvn:remoterepo id="JOSM-central" url="https://josm.openstreetmap.de/repository/public/" />
         </mvn:remoterepos>
         <mvn:resolve>
Index: applications/viewer/jmapviewer/pom.xml
===================================================================
--- applications/viewer/jmapviewer/pom.xml	(revision 36432)
+++ applications/viewer/jmapviewer/pom.xml	(revision 36433)
@@ -6,5 +6,5 @@
     <groupId>org.openstreetmap.jmapviewer</groupId>
     <artifactId>jmapviewer</artifactId>
-    <version>2.25-SNAPSHOT</version>
+    <version>2.26-SNAPSHOT</version>
 
     <name>JMapViewer</name>
@@ -71,10 +71,10 @@
             <id>josm-nexus-releases</id>
             <name>JOSM Nexus (Releases)</name>
-            <url>https://josm.openstreetmap.de/nexus/content/repositories/releases/</url>
+            <url>https://josm.openstreetmap.de/repository/releases/</url>
         </repository>
         <snapshotRepository>
             <id>josm-nexus-snapshot</id>
             <name>JOSM Nexus (Snapshot)</name>
-            <url>https://josm.openstreetmap.de/nexus/content/repositories/snapshots/</url>
+            <url>https://josm.openstreetmap.de/repository/snapshots/</url>
         </snapshotRepository>
     </distributionManagement>
@@ -83,5 +83,5 @@
         <repository>
             <id>JOSM-central</id>
-            <url>https://josm.openstreetmap.de/nexus/content/repositories/central/</url>
+            <url>https://josm.openstreetmap.de/repository/public/</url>
         </repository>
     </repositories>
@@ -89,5 +89,5 @@
         <pluginRepository>
             <id>JOSM-central</id>
-            <url>https://josm.openstreetmap.de/nexus/content/repositories/central/</url>
+            <url>https://josm.openstreetmap.de/repository/public/</url>
         </pluginRepository>
     </pluginRepositories>
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSource.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSource.java	(revision 36432)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSource.java	(revision 36433)
@@ -30,4 +30,5 @@
  * <li>{!y} - substituted with Yahoo Y tile number</li>
  * <li>{-y} - substituted with reversed Y tile number</li>
+ * <li>{quad} - Microsoft style quadkey</li>
  * <li>{apikey} - substituted with API key retrieved for the imagery id</li>
  * <li>{switch:VAL_A,VAL_B,VAL_C,...} - substituted with one of VAL_A, VAL_B, VAL_C. Usually
@@ -45,13 +46,15 @@
     private static final Pattern PATTERN_Y_YAHOO = Pattern.compile("\\{!y}");
     private static final Pattern PATTERN_NEG_Y   = Pattern.compile("\\{-y}");
+    private static final Pattern PATTERN_QUAD    = Pattern.compile("\\{quad}");
     private static final Pattern PATTERN_SWITCH  = Pattern.compile("\\{switch:([^}]+)}");
     private static final Pattern PATTERN_HEADER  = Pattern.compile("\\{header\\(([^,]+),([^}]+)\\)}");
     private static final Pattern PATTERN_API_KEY = Pattern.compile("\\{apikey}");
-    private static final Pattern PATTERN_PARAM  = Pattern.compile("\\{((?:\\d+-)?z(?:oom)?(:?[+-]\\d+)?|x|y|!y|-y|switch:([^}]+))}");
+    private static final Pattern PATTERN_PARAM  = Pattern.compile("\\{((?:\\d+-)?z(?:oom)?(:?[+-]\\d+)?|x|y|!y|-y|quad|switch:([^}]+))}");
 
     // CHECKSTYLE.ON: SingleSpaceSeparator
 
     private static final Pattern[] ALL_PATTERNS = {
-            PATTERN_HEADER, PATTERN_ZOOM, PATTERN_X, PATTERN_Y, PATTERN_Y_YAHOO, PATTERN_NEG_Y, PATTERN_SWITCH, PATTERN_API_KEY
+            PATTERN_HEADER, PATTERN_ZOOM, PATTERN_X, PATTERN_Y, PATTERN_Y_YAHOO, PATTERN_NEG_Y, PATTERN_SWITCH, PATTERN_API_KEY,
+            PATTERN_QUAD
     };
 
@@ -156,4 +159,7 @@
                 replacement = getRandomPart(randomParts);
                 break;
+            case "quad": // PATTERN_QUAD
+                replacement = xyzToQuadKey(tilex, tiley, zoom);
+                break;
             default:
                 // handle switch/zoom here, as group will contain parameters and switch will not work
@@ -170,4 +176,27 @@
         matcher.appendTail(url);
         return url.toString().replace(" ", "%20");
+    }
+
+    /**
+     * Convert an x y z coordinate to a quadkey
+     * @param x The x coordinate
+     * @param y The y coordinate
+     * @param z The z coordinate
+     * @return The quadkey
+     */
+    private static String xyzToQuadKey(int x, int y, int z) {
+        final char[] string = new char[z];
+        for (int i = z; i > 0; i--) {
+            char digit = '0';
+            final int mask = 1 << (i - 1);
+            if ((x & mask) != 0) {
+                digit++;
+            }
+            if ((y & mask) != 0) {
+                digit += 2;
+            }
+            string[z - i] = digit;
+        }
+        return String.valueOf(string);
     }
 
Index: applications/viewer/jmapviewer/test/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSourceTest.java
===================================================================
--- applications/viewer/jmapviewer/test/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSourceTest.java	(revision 36432)
+++ applications/viewer/jmapviewer/test/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSourceTest.java	(revision 36433)
@@ -30,5 +30,5 @@
      * triple of:
      *  * baseUrl
-     *  * expected tile url for zoom=1, x=2, y=3
+     *  * expected tile url for zoom=4, x=5, y=6
      *  * expected tile url for zoom=3, x=2, y=1
      */
@@ -39,5 +39,5 @@
         new String[] {
                 "http://imagico.de/map/osmim_tiles.php?layer=S2A_R136_N41_20150831T093006&z={zoom}&x={x}&y={-y}", 
-                "http://imagico.de/map/osmim_tiles.php?layer=S2A_R136_N41_20150831T093006&z=1&x=2&y=-2", 
+                "http://imagico.de/map/osmim_tiles.php?layer=S2A_R136_N41_20150831T093006&z=4&x=5&y=9", 
                 "http://imagico.de/map/osmim_tiles.php?layer=S2A_R136_N41_20150831T093006&z=3&x=2&y=6"
                 }
@@ -51,5 +51,5 @@
         checkGetTileUrl(
                 "http://localhost/{z}/{x}/{y}",
-                "http://localhost/1/2/3",
+                "http://localhost/4/5/6",
                 "http://localhost/3/1/2"
                 );
@@ -63,5 +63,5 @@
         checkGetTileUrl(
                 "http://localhost/{zoom+5}/{x}/{y}",
-                "http://localhost/6/2/3",
+                "http://localhost/9/5/6",
                 "http://localhost/8/1/2"
                 );
@@ -75,5 +75,5 @@
         checkGetTileUrl(
                 "http://localhost/{zoom-5}/{x}/{y}",
-                "http://localhost/-4/2/3",
+                "http://localhost/-1/5/6",
                 "http://localhost/-2/1/2"
                 );
@@ -87,5 +87,5 @@
         checkGetTileUrl(
                 "http://localhost/{5-zoom}/{x}/{y}",
-                "http://localhost/4/2/3",
+                "http://localhost/1/5/6",
                 "http://localhost/2/1/2"
                 );
@@ -99,5 +99,5 @@
         checkGetTileUrl(
                 "http://localhost/{10-zoom-5}/{x}/{y}",
-                "http://localhost/4/2/3",
+                "http://localhost/1/5/6",
                 "http://localhost/2/1/2"
                 );
@@ -112,5 +112,5 @@
         TileSourceInfo testImageryTMS = new TileSourceInfo("test imagery", "http://localhost/{zoom}/{x}/{y}?token={apikey}&foo=bar", "id1");
         TemplatedTMSTileSource ts = new TemplatedTMSTileSource(testImageryTMS);
-        assertEquals("http://localhost/1/2/3?token=wololo&foo=bar", ts.getTileUrl(1, 2, 3));
+        assertEquals("http://localhost/4/5/6?token=wololo&foo=bar", ts.getTileUrl(4, 5, 6));
     }
 
@@ -161,5 +161,5 @@
         checkGetTileUrl(
                 "http://localhost/{z}/{x}/{!y}",
-                "http://localhost/1/2/-3",
+                "http://localhost/4/5/1",
                 "http://localhost/3/1/1"
                 );
@@ -171,6 +171,16 @@
         checkGetTileUrl(
                 "http://localhost/{z}/{x}/{-y}",
-                "http://localhost/1/2/-2",
+                "http://localhost/4/5/9",
                 "http://localhost/3/1/5"
+                );
+
+    }
+
+    @Test
+    void testGetTileUrl_quad() {
+        checkGetTileUrl(
+                "http://localhost/{quad}",
+                "http://localhost/0321",
+                "http://localhost/021"
                 );
 
@@ -180,5 +190,5 @@
         TileSourceInfo testImageryTMS = new TileSourceInfo("test imagery", url, "id1");
         TemplatedTMSTileSource ts = new TemplatedTMSTileSource(testImageryTMS);
-        assertEquals(expected123, ts.getTileUrl(1, 2, 3));
+        assertEquals(expected123, ts.getTileUrl(4, 5, 6));
         assertEquals(expected312, ts.getTileUrl(3, 1, 2));
     }
@@ -192,5 +202,5 @@
             TileSourceInfo testImageryTMS = new TileSourceInfo("test imagery", test[0], "id1");
             TemplatedTMSTileSource ts = new TemplatedTMSTileSource(testImageryTMS);
-            assertEquals(test[1], ts.getTileUrl(1, 2, 3));
+            assertEquals(test[1], ts.getTileUrl(4, 5, 6));
             assertEquals(test[2], ts.getTileUrl(3, 2, 1));
         }
@@ -202,5 +212,5 @@
             TemplatedTMSTileSource ts = new TemplatedTMSTileSource(testImageryTMS);
             System.out.println(MessageFormat.format("new String[]{\"{0}\", \"{1}\", \"{2}\"},",
-                    url, ts.getTileUrl(1, 2, 3), ts.getTileUrl(3, 2, 1)));
+                    url, ts.getTileUrl(4, 5, 6), ts.getTileUrl(3, 2, 1)));
         }
     }
