title: Vertical alignment of TMS tiles in Leaflet using EPSG:25832 projection
body: <p>I am using Leaflet with Proj4Leaflet to work with tiles in 25832. The application is fairly simple: I am trying to overlay tiles in EPSG:25832 onto a omniscale basemap. I have copied the individual resolutions and origin from the tilemap meta information. The problem I am facing is that the map is not aligned and once I zoom in the tiles are not placed in the correct order. I'd appreciate any kind of support here (by the way, <a href="https://www.bmvi.de/DE/Themen/Digitales/Breitbandausbau/Breitbandatlas-Karte/start.html" rel="nofollow noreferrer">this</a> is a working example which is using openlayers).</p>
  <p>I guess I am doing something wrong here:</p>
  <pre><code>// Set resolutions
  var resolutions = [156367.7919628329,78183.89598141646,39091.94799070823,19545.973995354114,9772.986997677057,4886.4934988385285,2443.2467494192642,1221.6233747096321,610.8116873548161,305.40584367740803,152.70292183870401,76.35146091935201,38.175730459676004,19.087865229838002,9.543932614919001,4.7719663074595005,2.3859831537297502,1.1929915768648751];
  
  // Define CRS
  var rs25832 = new L.Proj.CRS(
      'EPSG:25832',
      proj4rs25832def, 
      {
          origin: [ 273211.2532533697, 6111822.37943825 ],
          resolutions: resolutions
      }
  );
  </code></pre>
  <p>...using the tiles information from <a href="https://mapproxy.bba.atenekom.eu/tms/1.0.0/privat_alle_50_mbit/germany" rel="nofollow noreferrer">https://mapproxy.bba.atenekom.eu/tms/1.0.0/privat_alle_50_mbit/germany</a> .</p>
  <p>Afterwards I add a tile layer</p>
  <pre><code>var url = 'https://mapproxy.bba.atenekom.eu/tms/1.0.0/privat_alle_50_mbit/germany/{z}/{x}/{y}.png';  
  
  var tileLayer = L.tileLayer(
      url, 
      {
          tms: true,
          crs: rs25832,
          continuousWorld: true,
          maxZoom: resolutions.length
      }
  );
  </code></pre>
  <p>And add them to the map..</p>
  <pre><code>// Setup map
  var map = L.map('map', {
      crs: rs25832,
      center: [ 50.8805, 7.3389 ],
      zoom:5,
      maxZoom: resolutions.length,
      layers: [ baseWms, tileLayer ]
  });
  </code></pre>
  <p>The bare minimum of code can be found here: <a href="https://jsfiddle.net/6gcam7w5/8/" rel="nofollow noreferrer">https://jsfiddle.net/6gcam7w5/8/</a></p>
  <p><a href="https://i.stack.imgur.com/7tc1p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7tc1p.png" alt="incorrect alignment" /></a></p>