title: why map.fitBounds(group.getBounds()) works with one set of data and not with another set of data?
body: <p>I try to see all the markers on a map.</p>
  
  <p>To that end I implement the following logic</p>
  
  <p>All logic is inside an object.</p>
  
  <pre><code>setLocation(places) {
      try {
          const {
              markers,
              markerArray
          } = this.getMarkers(places);
          const group = L.featureGroup(markerArray);
  
          this.map.addLayer(markers);
          this.map.fitBounds(group.getBounds());
      } catch (error) {
          console.log(`Error: ${error.message} Probably no places found`);
      }
  },
  </code></pre>
  
  <p><code>places</code> is an array of objects, where each object includes the properties latitude and longitude. For each of these objects a marker is created. The logic is as follows and is invoked from the <code>getMarkers()</code> method</p>
  
  <pre><code>getMarkers(points = buysmoke.points) {
      const markers = L.markerClusterGroup();
      const markerArray = [];
  
      for (const point of points) {
          const content = this.getContent(point);
          const icon = this.createIcon(point.categoria);
          const popup = this.createPopup(content);
          const marker = L.marker([point.latitud, point.longitud], {
              icon: icon
          }).bindPopup(popup);
  
          markerArray.push(marker);
          markers.addLayer(marker);
      }
  
      return {
          markers: markers,
          markerArray: markerArray
      };
  },
  </code></pre>
  
  <p>This logic is working with a set of data, which correspond to America. When I try the same with a data set from Europe the logic does not work and instead shows me the map of the whole world. The rest of the interactions on the map continue to work.</p>
  
  <p>I have tried to understand the reason for this, but without success.</p>
  
  <p>If you need any other information, please let me know.</p>
  
  <p>Thank you</p>
  
  <p>Update 1</p>
  
  <p>The data set of Europe consists of 195 records, probe only process 12 of them and works as expected. Is it somehow possible that some latitude and longitude is proving the problem? If it were a possibility is there some friendly way to track the problem?</p>
  
  <p>Update 2</p>
  
  <p>Indeed, the problem is caused due to a series of wrong lengths, a special one whose coordinate does not exist. When removing it from the data set, the markers are drawn on the map as estimated</p>
  
  <p>In any case, thank you very much. I hope this experience serves someone</p>