MapRouteLeg 類別

定義

代表在路線上兩個路點之間移動所需的動作集(機動)。

public ref class MapRouteLeg sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class MapRouteLeg final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class MapRouteLeg
Public NotInheritable Class MapRouteLeg
繼承
Object Platform::Object IInspectable MapRouteLeg
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

MapRouteLeg 物件的集合會透過 MapRoute 物件的 Legs 屬性傳回。 當您呼叫 MapRouteFinder 類別之 MapRouteFinderResult 方法時,會透過 mapRouteFinderResult Route 属性傳回 MapRoute 物件。

重要

Bing 地圖服務企業版服務淘汰

來自 Windows.Services.Maps 命名空間的 UWP MapControl 和地圖服務依賴 Bing 地圖服務。 Bing Enterprise 地圖服務已被取代,且將會淘汰,此時 MapControl 和服務將不再接收數據。

如需詳細資訊,請參閱 Bing 地圖服務開發人員中心Bing 地圖服務檔

您的應用程式必須先經過驗證,才能使用 Windows.Services.Maps 命名空間中的 MapControl 和地圖服務。 若要驗證您的應用程式,您必須指定地圖驗證金鑰。

請參閱 要求地圖驗證金鑰

版本歷程記錄

Windows 版本 SDK 版本 增加值
1703 15063 DurationWithoutTraffic
1703 15063 TrafficCongestion

屬性

BoundingBox

取得包含路線線的周框方塊。

DurationWithoutTraffic

取得在不使用流量的情況下周遊路由所需的估計時間。

EstimatedDuration

取得周遊路線段所需的估計時間。

LengthInMeters

取得以公尺為單位的路線線長度。

Maneuvers

取得與路線段相關聯的機動清單。

Path

取得路線段的路徑。

TrafficCongestion

取得沿著地圖路線段的交通擁堵程度。

適用於

另請參閱