I am trying to draw a route on Map Control in UWP application for desktops for specific locations:

Start: { Latitude = 33.8917742, Longitude = -87.5261236 } End: { Latitude = 32.318231, Longitude = -86.902298 }

Caller API: MapRouteFinder.GetDrivingRouteAsync(startPoint, endPoint)

Issue: after I call, it never respond , It does not accept cancelation token, then I have tried to cancel manually with different approach but does not work. It seems initiator never canceled.

See here locations Please let me know in case required more details.

Code Snap shot

var startPoint = new Geopoint(new BasicGeoposition() { Latitude = 33.8917742, Longitude = -87.5261236 }); var endPoint = new Geopoint(new BasicGeoposition() { Latitude = 32.318231, Longitude = -86.902298 }); var routeResult = await MapRouteFinder.GetDrivingRouteAsync(startPoint, endPoint);

            if (routeResult.Status == MapRouteFinderStatus.Success)
            {
                MapRouteView viewOfRoute = new MapRouteView(routeResult.Route);
                viewOfRoute.RouteColor = Colors.Orange;
                viewOfRoute.OutlineColor = Colors.Red;
                myMap.Routes.Add(viewOfRoute);
            }

Please find Video and Sample Code here: https://drive.google.com/drive/folders/1_hQtOxLV8YCO-AwzKGLKIGXCfJX1hL8R?usp=sharing

Device Information: OS Name Microsoft Windows 10 Pro Version 10.0.18362 Build 18362 OS Manufacturer Microsoft Corporation System Manufacturer Hewlett-Packard System Model HP EliteBook 840 G2 System Type x64-based PC Processor Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz, 2601 Mhz, 2 Core(s), 4 Logical Processor(s) BIOS Version/Date Hewlett-Packard M71 Ver. 01.28, 4/18/2019 SMBIOS Version 2.7 Embedded Controller Version 150.91 BIOS Mode Legacy BaseBoard Manufacturer Hewlett-Packard BaseBoard Product 2216 BaseBoard Version KBC Version 96.5B Platform Role Mobile Locale United States Time Zone India Standard Time Installed Physical Memory (RAM) 12.0 GB Total Physical Memory 11.9 GB Available Physical Memory 2.38 GB Total Virtual Memory 17.1 GB Available Virtual Memory 4.07 GB Page File Space 5.23 GB Kernel DMA Protection Off

**

[Issue Resolved]: Today[1 Oct 2020] I have restart my system and tried again and issue was fixed, My code is working, Still not sure why it was happened.

I had posted same issue here and someone suggested to reinstall Map app. Then I tried restart.

https://learn.microsoft.com/en-us/answers/questions/112943/uwp-application-map-route-api-maproutefindergetdri.html

**

0

There are 0 answers