public TripMapPage(TripModel tripSelected) { InitializeComponent(); MapTrip.MoveToRegion( MapSpan.FromCenterAndRadius( new Position(tripSelected.Latitude, tripSelected.Longitude), Distance.FromMiles(.5) )); tripSelected.ImageUrl = new ImageService().SaveImageFromBase64(tripSelected.ImageUrl); MapTrip.Trip = tripSelected; MapTrip.Pins.Add( new Pin { Type = PinType.Place, Label = tripSelected.Title, Position = new Position(tripSelected.Latitude, tripSelected.Longitude) } ); Title.Text = tripSelected.Title; Date.Text = tripSelected.TripDate.ToShortDateString(); Rating.Text = $"{tripSelected.Rating} Estrellas"; Notes.Text = tripSelected.Notes; }
public MapPage(DriverModel driverSelected) { InitializeComponent(); MapTrip.MoveToRegion( MapSpan.FromCenterAndRadius( new Position(Convert.ToDouble(driverSelected.ActualPosition.Latitude), Convert.ToDouble(driverSelected.ActualPosition.Longitude)), Distance.FromMiles(.5) )); MapTrip.Pins.Add( new Pin { Type = PinType.Place, Label = driverSelected.Name, Position = new Position(double.Parse(driverSelected.ActualPosition.Latitude), double.Parse(driverSelected.ActualPosition.Longitude)) } ); //datos del viaje Name.Text = driverSelected.Name; Status.Text = driverSelected.Status; }