Share via


MapService Class

Definition

Communicates with the online map services.

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
Inheritance
Object Platform::Object IInspectable MapService
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

Important

Bing Maps for Enterprise service retirement

The UWP MapControl and map services from the Windows.Services.Maps namespaces rely on Bing Maps. Bing Maps for Enterprise is deprecated and will be retired, at which point the MapControl and services will no longer receive data.

For more information, see the Bing Maps Developer Center and Bing Maps documentation.

Your app must be authenticated before it can use the MapControl and map services in the Windows.Services.Maps namespace. To authenticate your app, you must specify a maps authentication key.

See Request a maps authentication key.

Version history

Windows version SDK version Value added
1511 10586 DataAttributions
1703 15063 DataUsagePreference

Properties

DataAttributions

Gets the data provider for the mapping services.

DataUsagePreference

Gets or sets an object that specifies whether to use offline or online map data.

ServiceToken

Gets or sets the application ID and the authentication token required for use of the online mapping services.

WorldViewRegionCode

Gets the three digit country code used by the Map service, based on the ISO 3166-1 alpha-3 codes.

Applies to

See also