Index: trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java	(revision 15408)
+++ trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java	(revision 15409)
@@ -183,4 +183,13 @@
             return crs;
         }
+
+        /**
+         * Returns tile matrix max zoom. Assumes first zoom starts at 0, with continuous zoom levels.
+         * @return tile matrix max zoom
+         * @since 15409
+         */
+        public int getMaxZoom() {
+            return tileMatrix.size() - 1;
+        }
     }
 
@@ -258,4 +267,13 @@
         public TileMatrixSet getTileMatrixSet() {
             return tileMatrixSet;
+        }
+
+        /**
+         * Returns layer max zoom.
+         * @return layer max zoom
+         * @since 15409
+         */
+        public int getMaxZoom() {
+            return tileMatrixSet != null ? tileMatrixSet.getMaxZoom() : 0;
         }
     }
@@ -334,4 +352,8 @@
             if (!layers.isEmpty()) {
                 Layer first = layers.iterator().next();
+                // If max zoom lower than expected, try to find a better layer
+                if (first.getMaxZoom() < info.getMaxZoom()) {
+                    first = layers.stream().filter(l -> l.getMaxZoom() >= info.getMaxZoom()).findFirst().orElse(first);
+                }
                 this.defaultLayer = new DefaultLayer(info.getImageryType(), first.identifier, first.style, first.tileMatrixSet.identifier);
             } else {
@@ -943,5 +965,5 @@
     public int getMaxZoom() {
         if (this.currentTileMatrixSet != null) {
-            return this.currentTileMatrixSet.tileMatrix.size()-1;
+            return this.currentTileMatrixSet.getMaxZoom();
         }
         return 0;
