MapService 类

定义

与联机地图服务通信。

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
继承
Object Platform::Object IInspectable 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

获取或设置使用联机映射服务所需的应用程序 ID 和身份验证令牌。

WorldViewRegionCode

获取地图服务基于 ISO 3166-1 alpha-3 代码使用的三位数国家/地区代码。

适用于

另请参阅