|
|
@@ -53,6 +53,8 @@ namespace Breda_Tour.MapScreen
|
|
|
route = routeDB.Routes.ElementAt(0);
|
|
|
this.InitializeComponent();
|
|
|
Debug.Write("New Map generated");
|
|
|
+ ShowWaypoints(route);
|
|
|
+ ShowRoute(route);
|
|
|
}
|
|
|
|
|
|
protected override void OnNavigatedTo(NavigationEventArgs e)
|
|
|
@@ -61,8 +63,6 @@ namespace Breda_Tour.MapScreen
|
|
|
DefaultPivot.SetCheckedButton(DefaultPivotControl.Tab.Map);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
public async void ShowLocaton(Geopoint point)
|
|
|
{
|
|
|
this.point = point;
|
|
|
@@ -76,13 +76,11 @@ namespace Breda_Tour.MapScreen
|
|
|
marker.Location = point;
|
|
|
});
|
|
|
await Map.TrySetViewAsync(point, 17);
|
|
|
- ShowWaypoints(route);
|
|
|
- ShowRoute(route);
|
|
|
}
|
|
|
|
|
|
public async void ShowRoute(Route route)
|
|
|
{
|
|
|
- await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async () =>
|
|
|
+ await Dispatcher.RunAsync(CoreDispatcherPriority.High, async () =>
|
|
|
{
|
|
|
List<Geopoint> geopoints = new List<Geopoint>();
|
|
|
foreach (Waypoint wayPoint in route.Waypoints)
|
|
|
@@ -102,7 +100,7 @@ namespace Breda_Tour.MapScreen
|
|
|
|
|
|
public async void ShowWaypoints(Route route)
|
|
|
{
|
|
|
- await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
|
|
|
+ await Dispatcher.RunAsync(CoreDispatcherPriority.Low, () =>
|
|
|
{
|
|
|
for (int x = 0; x < route.Waypoints.Count; x++)
|
|
|
{
|