message: radial distance function (haversine)
diff: +import { Coords } from 'google-map-react';
  import moment from 'moment';
  // default center
  @@ -50,3 +51,20 @@ export const getStreetAddressFromProfile = profileState => {
  return formattedAddress;
  }
  };
  +
  +export const haversineDistance = (latLng1: Coords, latLng2: Coords): number => {
  + const lon1 = latLng1.lng;
  + const lon2 = latLng2.lng;
  + const radlat1 = (Math.PI * latLng1.lat) / 180;
  + const radlat2 = (Math.PI * latLng2.lat) / 180;
  + const theta = lon1 - lon2;
  + const radtheta = (Math.PI * theta) / 180;
  + let dist =
  + Math.sin(radlat1) * Math.sin(radlat2) +
  + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);
  + dist = Math.acos(dist);
  + dist = (dist * 180) / Math.PI;
  + dist = dist * 60 * 1.1515;
  + dist *= 1609.344; // for meters
  + return dist;
  +};
  