/// <summary> /// Adds a new section to this route. A section is a list of geolocations representing a subpart of a route. /// </summary> /// <param name="section">Thew list of geolocations representing a section.</param> public void AddSection(List <GeoLocation> section) { if (section != null) { RouteLocations.Add(section); } }
void UpdateMapElements(GeoCoordinate currentLoc) { Center = currentLoc; Pushpins.Clear(); Pushpins.Add(new Pushpin { Location = currentLoc }); Speed = (currentLoc.Speed * 3.6).ToString(); Altitude = currentLoc.Altitude.ToString(); if (IsRecording == false) { return; } RouteLocations.Add(currentLoc); if (RouteLocations.Count - 2 >= 0) { Distance = Distance + RouteLocations[RouteLocations.Count - 2].GetDistanceTo(currentLoc); } if (Routes.Count == 0) { var routeModel = new RouteModel(RouteLocations); Routes.Add(routeModel); Route = routeModel; } NotifyPropertyChanged(() => Route); NotifyPropertyChanged(() => Routes); }