Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WP7 Bing Maps 'Invalid Credentials' Error

I'm trying to use a bing maps control on a windows phone 7 silverlight application and it shows this error overlaid on the map.

Invalid Credentials, Sign up for a Developer Account

I've tried using app IDs from these two sites: http://www.bing.com/developers, and https://www.bingmapsportal.com/

am I doing something wrong? is there some account setting that I'm missing? For reference, here's how I'm defining the control and interacting with it:

<my:Map x:Name="MyMap" CredentialsProvider="<<myAppId>>"  />

And in the code behind:

var vm = this.DataContext as ItemViewModel;
Pushpin pushpin = new Pushpin();
Location location = new Location()
{
    Latitude = vm.Latitude,
    Longitude = vm.Longitude
};
pushpin.Location = location;

MyMap.ZoomLevel = 15;
MyMap.Center = location;
MyMap.Children.Add(pushpin);
like image 649
Joel Martinez Avatar asked Mar 12 '11 15:03

Joel Martinez


1 Answers

Go to http://bingmapsportal.com and sign in with your Windows Live ID. Once signed in, click Create or view keys in the menu on the left. If you haven't already, create an application by entering the name, URL, and selecting a type (Mobile). Once you've got your application created, copy the long string of characters and paste it into your XAML as the value of the CredentialsProvider attribute.

<my:Map CredentialsProvider="NOTREALVF7QTW-LZfG0p7-RhSPeGvlfx3fdtgR-Gk_SB-wfF8kCj2J7nI57wjIna" />
like image 89
Derek Lakin Avatar answered Oct 04 '22 20:10

Derek Lakin