title: Shift between WMS Tiles in Leaflet
body: <p>I use Leaflet to show a WMS Layer via a proxy.php (for authentication). That is working on most WMS Layers. But I have some WMS Sources, which are having a small shift in the tiles. See Overlay Map in the example.</p>
  <p><a href="https://i.stack.imgur.com/Y0r9z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y0r9z.png" alt="See Shift of Tiles in this Image:" /></a></p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    var map1  = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
          maxZoom: 30,
          maxNativeZoom: 18
      });
      
  
      var map4 = new L.tileLayer.wms("https://entwicklung.firetab.ch/maptest/proxy.php?url=http://geoshop.kommunalportal.ch/SWMS?", {
          layers: 'lk_wms_wasser',
          format: 'image/png',
          transparent: true,
          maxZoom:30
      });
  
      var map = L.map('mapid').setView([47.549904, 9.152927], 18);
      
      var baseMaps = {
          "map1": map1
          
      };
      
      var overlayMaps = {
          "map4": map4
      };
      
      L.control.layers(baseMaps, overlayMaps).addTo(map);
  
      map1.addTo(map);
      map4.addTo(map);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css" /&gt;
      &lt;script src="https://unpkg.com/leaflet@1.6.0/dist/leaflet.js"&gt;&lt;/script&gt;
  
  &lt;div id="mapid" style="width: 100%; height: 800px;"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>