private void updateRouteCollection(WeBreda.Model.Waypoint currentWaypoint) { if (waypointCollectionList.Count == 0) return; WaypointCollection collection = waypointCollectionList[routeIndex]; if (collection.Count == 0) return; Bing.Maps.Directions.Waypoint lastWaypoint = collection[collection.Count -1]; //If the tablet is at the last location if (lastWaypoint.Location.Latitude == currentWaypoint.Latitude && lastWaypoint.Location.Longitude == currentWaypoint.Longitude) { //Set the next route routeIndex++; try { directionsManager.ActiveRoute = routeCollection[routeIndex]; control.currentRoute.RouteIndex = routeIndex; } catch { } } }
private void showMonument(WeBreda.Model.Waypoint wp) { if(wp is PointOfInterest) showMonument((PointOfInterest) wp); }
/// <summary> /// Sets the isVisited boolean of a Waypoint to true /// </summary> private void updateWaypointStatus(string id, WeBreda.Model.Waypoint waypoint) { List<Pushpin> list = new List<Pushpin>(); list = Map.Children.OfType<Pushpin>().ToList(); waypoint.IsVisited = true; foreach(Pushpin pin in list) { if (pin.Tag.ToString() == id) { pin.Background = new SolidColorBrush(Colors.Green); } } }