title: Why does my Leaflet map centered the point of its lower left coner?
body: <p>I have a leaflet map on my website with markers. However, I can't centered it well on Paris.
  This code works :</p>
  <pre><code>map.setView([lat,lng],zoom);
  </code></pre>
  <p>The map shows Paris as it's supposed to but the point I chose is not in the middle of my map. The map is centered on its lower left corner</p>
  <p>Does someone know how to center the point in the middle of my map?</p>
  <p>Thank's</p>
  <p>Edit : full code</p>
  <pre><code> var map = L.map('map', {
      scrollWheelZoom: false
  })
  map.setView(&lt;?php echo &quot;[&quot;.$latVille.&quot;, &quot;.$lngVille.&quot;], &quot;.$zoomVille;?&gt;);
  L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', {
      attribution: 'Map data &amp;copy; &lt;a href=&quot;https://www.openstreetmap.org/copyright&quot;&gt;OpenStreetMap&lt;/a&gt; contributors, Imagery © &lt;a href=&quot;https://www.mapbox.com/&quot;&gt;Mapbox&lt;/a&gt;',
      maxZoom: 18,
      id: 'mapbox/streets-v8',
      tileSize: 512,
      zoomOffset: -1,
      accessToken: ''
  }).addTo(map);
  Array.from($(&quot;.js-marker&quot;)).forEach((item) =&gt; {
          let marker = L.popup({
                                  autoClose: false,
                                  closeOnEsacapeKey: false,
                                  closeOnClick: false,
                                  closeButton: false,
                                  className: 'marker',
                                  maxWidth: 300
                              })
                                  .setLatLng([item.dataset.lat,item.dataset.lng])
                                  .setContent(item.dataset.prix+' €')
                                  .openOn(map);})
  </code></pre>
  <p>Result : <img src="https://i.stack.imgur.com/tW5gH.jpg" alt="Screenshot" /></p>