How to Obtain & apply ApplicationId and AuthenticationToken for Map Control in WP8?

This article will explain how to obtain the ApplicationId and AuthenticationToken and then apply them for the Map Control in the Windows Phone Application.

When a Map Control is included in your Windows Phone App, it is necessary to add the API key (ApplicationId and AuthenticationToken) to the Map Control for the app to run fine in the production. Note that you don’t need the API key during the development of the application.

How to Obtain & apply ApplicationId and AuthenticationToken for Map Control in WP8?

The ApplicationId and the AuthenticationToken for WP8 App is obtained during the Windows Phone Marketplace submission. Follow the below steps to retrieve the API key

1. Login to the Windows Phone Dev Account with your developer account credentials

2. Navigate to the Dashboard and create / edit the existing app submission.

3. In the Application Info screen, click “Map Services” as shown in the below screenshot.

How to Obtain & apply ApplicationId and AuthenticationToken for Map Control in WP8?

4. In the Map services screen, click “Get token” hyperlink.

How to Obtain & apply ApplicationId and AuthenticationToken for Map Control in WP8?

5. This will generate the Map service ApplicationId and Map service AuthenticationToken and display in the same screen. Copy them.

How to Obtain & apply ApplicationId and AuthenticationToken for Map Control in WP8?

6. Open your Windows Phone Application and the page where the Map Control is included. Include the API Key in the map control’s loaded event as shown in the below.

private void Map1_Loaded(object sender, RoutedEventArgs e)

{

MapsSettings.ApplicationContext.ApplicationId = "Paste ApplicationId";

MapsSettings.ApplicationContext.AuthenticationToken = "Application Token";

}
<maps:Map x:Name="Map1" HorizontalAlignment="Left" Height="424" Margin="0,44,0,0" VerticalAlignment="Top" Width="446" Loaded="Map1_Loaded" />

7. Rebuild your app with the release mode and submit the XAP file.

    1 Comment

  1. August 22, 2013
    Reply

    How to get it working with a developer device or as a betatester? Tha map is just blank on a physical device, but on the emulator its ok.

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

This blog post will guide you through several effective methods to troubleshoot and resolve the issue of Microsoft Edge not...
Windows 11 offers a range of audio enhancements that can enrich your listening experience. These enhancements include features like virtual...
Windows 11 brings a fresh and visually stunning design to your desktop, and one of the standout features is the...