public static double CalculateDistance(GraphUser me, GraphUser user)
        {
            if (me.HasLocation() && user.HasLocation())
            {
                var dist = MapHelper.CalculateDistance(
                    me.Location().Value.Latitude,
                    me.Location().Value.Longitude,
                    user.Location().Value.Latitude,
                    user.Location().Value.Longitude,
                    DistanceMeasure.Miles);

                return(dist);
            }

            return(Double.NaN);
        }
        private ObservableCollection <CustomPin> CalculateDrivePushpins(GraphUser driver)
        {
            ObservableCollection <CustomPin> pins = new ObservableCollection <CustomPin>();

            if (driver.HasLocation())
            {
                pins.Add(driver.CreateUserPin());
            }

            if (driver.HasWorkLocation())
            {
                pins.Add(driver.CreateWorkPin());
            }

            return(pins);
        }