MapRoute 類別

定義

表示在兩個或多個路徑之間移動的路徑。

public ref class MapRoute 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 MapRoute 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 MapRoute
Public NotInheritable Class MapRoute
繼承
Object Platform::Object IInspectable MapRoute
屬性

Windows 需求

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

備註

當您呼叫MapRouteFinder類別的方法時,MapRouteFinderResult 會透過 MapRouteFinderResultRoute屬性傳回 MapRoute 物件。

若要在MapControl上顯示MapRoute,請使用 MapRoute 建構 MapRouteView,並將MapRouteView新增至MapControlRoute集合。

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

請參閱 要求地圖驗證金鑰

版本歷程記錄

Windows 版本 SDK 版本 已新增值
1703 15063 DurationWithoutTraffic
1703 15063 TrafficCongestion
1709 16299 IsScenic

屬性

BoundingBox

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

DurationWithoutTraffic

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

EstimatedDuration

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

HasBlockedRoads

取得值,這個值表示路線已從「最佳」路線修改,以避免封鎖道路。

IsScenic

取得值,指出 MapRoute 是否以道路為基礎。

IsTrafficBased

取得值,指出 MapRoute 是否以流量為基礎。

Legs

取得與路線相關聯的回合清單。

LengthInMeters

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

Path

取得路由的路徑。

TrafficCongestion

取得地圖路線的交通壅塞層級。

ViolatedRestrictions

取得值,這個值表示路由是否違反任何限制。

適用於

另請參閱