MapService 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
與線上地圖服務通訊。
public ref class MapService abstract 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 MapService 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 static class MapService
Public Class MapService
- 繼承
- 屬性
Windows 需求
裝置系列 |
Windows 10 (已於 10.0.10240.0 引進)
|
API contract |
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)
|
備註
您的通用 Windows 應用程式必須先經過驗證,才能使用Windows.Services.Maps命名空間中的MapControl和地圖服務。 若要驗證您的應用程式,則必須指定地圖驗證金鑰。
請參閱 要求地圖驗證金鑰。
版本歷程記錄
Windows 版本 | SDK 版本 | 已新增值 |
---|---|---|
1511 | 10586 | DataAttributions |
1703 | 15063 | DataUsagePreference |
屬性
DataAttributions |
取得對應服務的資料提供者。 |
DataUsagePreference |
取得或設定 物件,指定是否要使用離線或線上地圖資料。 |
ServiceToken |
取得或設定使用線上對應服務所需的應用程式識別碼和驗證權杖。 |
WorldViewRegionCode |
根據 ISO 3166-1 Alpha-3 代碼,取得地圖服務所使用的三位數國家/地區代碼。 |
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應