/// <summary>Maps the view data.</summary> /// <param name="unit">The unit.</param> /// <returns>Mapped model for the view.</returns> private ShowEstateModel MapViewData(Unit unit) { var model = new ShowEstateModel(); Mapper.Map(unit, model); var coordinates = this.unitFinder.GetCoordinatesObject(unit); model.Latitude = coordinates.Item1; model.Longitude = coordinates.Item2; model.Email = unit.Vendor.Email; model.Name = unit.Vendor.Name; model.Rating = unit.Vendor.Rating; model.State = unit.GetAddress().State; model.City = unit.GetAddress().City; model.LineOne = unit.GetAddress().LineOne; model.LineTwo = unit.GetAddress().LineTwo; model.Zip = unit.GetAddress().Zip; model.ImagePath = this.imageService.GetImage(unit, Server.MapPath(PATH_TO_UPLOADED_FILES)); return model; }