public void MapPoints_HasOneItem_Test() { MapPoints target = new MapPoints(); target.Add(new MapPoint() { Lat = 1, Lon = 2, Name = "test Name" }); Assert.AreEqual(1, target.Count); }
public override void InitFullEventData(JObject json) { base.InitFullEventData(json); dynamic fullEvent = (dynamic)json; foreach (dynamic sequenceData in fullEvent.value[0].Sequences) { Sequences.Add(new RunEventSequenceItem(sequenceData)); } // parse out map points foreach (dynamic mapData in fullEvent.value[0].MapPoints) { var runMapPoint = new RunMapPoint() { Type = mapData.MapPointType, SecondsSinceStart = mapData.SecondsSinceStart, Ordinal = mapData.MapPointOrdinal, Distance = mapData.TotalDistance, HeartRate = mapData.HeartRate, Pace = ((double)mapData.Pace * 0.001), ScaledPace = mapData.ScaledPace, IsPaused = mapData.IsPaused, IsResume = mapData.IsResume }; if (mapData.Location != null) { runMapPoint.Latitude = ((double)mapData.Location.Latitude * 1E-07); runMapPoint.Longitude = ((double)mapData.Location.Longitude * 1E-07); runMapPoint.Altitude = ((double)mapData.Location.AltitudeFromMSL * 0.01); runMapPoint.EHPE = ((double)mapData.Location.EHPE * 0.01); runMapPoint.EVPE = ((double)mapData.Location.EVPE * 0.01); HasGPSPoints = true; } MapPoints.Add(runMapPoint); } }
private void SaveNewPoint() { MapPoints.Add(CurrentMapPoint); GoToPointList(); }