我正在尝试使用UWP MapControl,但特别是MapRouteFinder。 我已经尝试过https://docs.microsoft.com/en-us/windows/uwp/maps-and-location/routes-and-directions
的这段代码 // Get the route between the points.
MapRouteFinderResult routeResult =
await MapRouteFinder.GetDrivingRouteAsync(
new Geopoint(startLocation),
new Geopoint(endLocation),
MapRouteOptimization.Time,
MapRouteRestrictions.None);
不幸的是,我因此出现了构建错误:
Severity Code Description Project File Line Suppression State
Error CS4036 'IAsyncOperation<MapRouteFinderResult>' does not contain a
definition for 'GetAwaiter' and no extension method 'GetAwaiter' accepting a
first argument of type 'IAsyncOperation<MapRouteFinderResult>' could be found
(are you missing a using directive for 'System'?)
不确定是否缺少'System'的using指令?手段。