Skip to content

Commit

Permalink
tijd tussen punten (#84)
Browse files Browse the repository at this point in the history
* acurate distance

* fix probleem

* tijd

* not comitted oops
  • Loading branch information
Carnitter authored and bartmachielsen committed Jan 5, 2017
1 parent c8f91d5 commit 96b420e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions VVVOnTheWay/VVVOnTheWay/Pages/MapPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,11 @@ private async void ShowNewRoute(Geoposition position)
if (routeResult == null) return;
if (_routeView != null)
Map.Routes.Remove(_routeView);
var distance = routeResult.LengthInMeters;
if (distance >= 1000.0) textBlock2.Text = Math.Round(distance / 1000.0, 2) + " km";
else textBlock2.Text = distance + " m";
double distance = routeResult.LengthInMeters;
if (distance >= 1000.0) { textBlock2.Text = Math.Round(distance / 1000.0, 2) + " km"; }
else { textBlock2.Text = distance + " m"; }
textBlock1.Text = (Math.Round(distance/5000) + " : " + Math.Round(distance/1000 %5 /5 *60));

//@TODO textblock1 check lang
_routeView = new MapRouteView(routeResult)
{
Expand Down

0 comments on commit 96b420e

Please sign in to comment.