code: function calculateBoundsFromArray (array) {
      var x1 = null, x2 = null, y1 = null, y2 = null;
  
      for (var i = 0; i < array.length; i++) {
        var lonlat = array[i];
        var lon = lonlat[0];
        var lat = lonlat[1];
  
        if (x1 === null) {
          x1 = lon;
        } else if (lon < x1) {
          x1 = lon;
        }
  
        if (x2 === null) {
          x2 = lon;
        } else if (lon > x2) {
          x2 = lon;
        }
  
        if (y1 === null) {
          y1 = lat;
        } else if (lat < y1) {
          y1 = lat;
        }
  
        if (y2 === null) {
          y2 = lat;
        } else if (lat > y2) {
          y2 = lat;
        }
      }
  
      return [x1, y1, x2, y2 ];
    }
docs: /*
  Internal: Calculate a bounding box from an array of positions
  [
  [lng, lat],[lng, lat],[lng, lat]
  ]