Share via


MapControl.MapServiceToken Property

Definition

Gets or sets the authentication key required for using the MapControl and online mapping services.

public:
 property Platform::String ^ MapServiceToken { Platform::String ^ get(); void set(Platform::String ^ value); };
winrt::hstring MapServiceToken();

void MapServiceToken(winrt::hstring value);
public string MapServiceToken { get; set; }
var string = mapControl.mapServiceToken;
mapControl.mapServiceToken = string;
Public Property MapServiceToken As String

Property Value

String

Platform::String

winrt::hstring

The authentication key required for using the MapControl and online mapping services. The default is an empty string.

Remarks

See Manage your Azure Maps account for information about how to obtain a shared key for authentication.

An invalid token will prevent authentication with Azure Maps service. The MapControl will raise a map service error and show only a blue background.

Applies to