private void OnCalculateRouteCompletion(NMARouteResult routeResult, NMARoutingError error) { if (routeResult != null && routeResult.Routes.Length >= 1) { // Let's add the 1st result onto the map NMARoute route = routeResult.Routes[0]; MapRoute = new NMAMapRoute(route); MapView.AddMapObject(MapRoute); // In order to see the entire route, we orientate the map view // accordingly MapView.SetBoundingBox(route.BoundingBox, NMAMapAnimation.Linear); } else { Console.WriteLine("Error:route result returned is not valid"); Console.WriteLine("Error:route calculation returned error code %d", (int)error); } }