helper_functions/polygonsCenters/polygonsCenters.js
/**
  * Returns index of the polygon with the largest area 
  * @param {Feature<Polygon>} feature Mutipolygon Feature
  * @return {number} index of the largest area
*/
Returns index of the polygon with the largest area
@param {Feature} feature Mutipolygon Feature
@return {number} index of the largest area
Returns index of the polygon with the largest area @param { Feature } feature Mutipolygon Feature @return { number } index of the largest area
function findMaxAreaIndex(feature) {
    const areaArr = feature.geometry.coordinates.map((featurePolygon) => {
        return area(polygon(featurePolygon));
    });
    return findIndexOfMax(areaArr);
}
function findMaxAreaIndex ( feature ) { const areaArr = feature . geometry . coordinates . map ( ( featurePolygon ) => { return area ( polygon ( featurePolygon ) ) ; } ) ; return findIndexOfMax ( areaArr ) ; }
Returns index of the polygon with the largest area
 @param {Feature<Polygon>} feature Mutipolygon Feature
 @return {number} index of the largest area
Returns index of the polygon with the largest area @param { Feature<Polygon > } feature Mutipolygon Feature @return { number } index of the largest area
// Create an array of area sizes from each polygon