import * as turf from '@turf/turf';

function getCenter(type,geojson){
    let centroid = null;
   if(type == "polygon"){
    let polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);
    centroid = turf.centroid(polygon);
   }else if(type == "line"){

   }
   return centroid;
}

export {getCenter}