public async Task Load(int segmentAttemptId) { SegmentAttempt = await Context.Services.GetSegmentAttempt(segmentAttemptId); MapViewModel = new MapControlViewModel( Context, SegmentAttempt.FormattedTime, PolyUtils.GetMapLocations(SegmentAttempt.Locations, SegmentAttempt.Jumps)); OnPropertyChanged(nameof(MapViewModel)); }
public async Task Load(int id) { Ride = await Context.Services.GetRide(id); MapViewModel = new MapControlViewModel( Context, Ride.DisplayName, PolyUtils.GetMapLocations(Ride.Locations, Ride.Jumps)); OnPropertyChanged(nameof(MapViewModel)); }
public async Task Load(int id) { Segment = await Context.Services.GetSegment(id); MapViewModel = new MapControlViewModel( Context, Segment.Name, PolyUtils.GetMapLocations(Segment.Locations), showRideFeatures: false); OnPropertyChanged(nameof(MapViewModel)); }
public CreateSegmentScreenViewModel(MainContext context, RideDto ride) : base(context) { segment = new SegmentDto(); Ride = ride; count = 1; displayText = "Tap on the map to set a start point"; MapViewModel = new MapControlViewModel( context, Ride?.DisplayName ?? "Map", ride != null ? PolyUtils.GetMapLocations(Ride.Locations, Ride.Jumps) : new List <MapLocation>(), isReadOnly: false, showRideFeatures: false, goToMapPageOnClick: false, mapType: MapType.Satellite, canChangeMapType: true); MapViewModel.MapTapped += MapViewModel_MapTapped; }