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

export const calculateMapRegion = (bounds: turf.BBox) => {
  const padding = 10;
  return {
    latitude: (bounds[1] + bounds[3]) / 2,
    longitude: (bounds[0] + bounds[2]) / 2,
    latitudeDelta: Math.abs(bounds[3] - bounds[1]) + padding,
    longitudeDelta: Math.abs(bounds[2] - bounds[0]) + padding
  };
};
