c# - Bing Maps GetRoute gives '0x8004231C' error -


I am trying to show a path from point-to-point on Bing-Maps (test on real devices). I have logged in to GeoCoordinate and I am trying to get the route through Windows PhoneToolKit while waiting for . Query GetRouteAsync () Unfortunately, I'm getting an unknown error:

The result of the async call:

  'e. The result 'threw an exception of type. Reflection.TargetInvocationException '  

Internal Exception:

  Exceptions HRESULT: 0x8004231C   

I have checked and seen That this error code is not listed in the error list ...

The related code is below I have used the exact same code as the sample set of the Windows Phone Toolkit, but removed those things Nothing to do to get a pass route:

  Private async zero BtnShowRoute_Tap (Object Sender, System.Windows.Input.GestureEventArg s E) {tryoutquery query = new route (); & Lt; GeoCoordinate & gt; WayPoints = new list & lt; GeoCoordinate & gt; (); WayPoints.Add (new GeoCoordinate (47.23449, -121.172447)); WayPoints.Add (new GeoCoordinate (47.062638, -120.691795)); Query Y Point = Waypoint; Route route = Wait for the query. GetRouteAsync (); } Hold (Exception pre) {Message Box. Show (ex.Message); throw; }}   

I do not know what's going wrong here. Is anyone else experiencing this problem? If so, do you solve it? And how?

Note: I am running Windows Phone 8.1. Dev Preview

This is the time when the query is expected to fulfill the query before the completion of the query It will be fixed in the next version, but now you can use the following code:

  Private async zero BtnShowRoute_Tap (Object Sender, System.Windows.Input.GestureEventArgs e) {RouteQuery Query = New RouteQuery (); & Lt; GeoCoordinate & gt; WayPoints = new list & lt; GeoCoordinate & gt; (); WayPoints.Add (new GeoCoordinate (47.23449, -121.172447)); WayPoints.Add (new GeoCoordinate (47.062638, -120.691795)); Query Y Point = Waypoint; Query .QueryCompleted + = geoQ_Query Complete; query.GetRouteAsync (); } Private zero geoQ_QueryCompleted (object sender, QueryCompletedEventArgs & lt; root & gt; e) {try {root myRoute = e.Result; } Catch (Target Invocation Exception) {Thread. Sleep (1000); // query to complete the query geoQ_QueryCompleted (sender, e); }}    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -