WP7 Bing Maps 'Invalid Credentials' Error

后端 未结 2 758
长发绾君心
长发绾君心 2021-01-12 16:14

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,

相关标签:
2条回答
  • 2021-01-12 16:48

    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" />
    0 讨论(0)
  • 2021-01-12 16:50

    After much travail, I finally discovered that this occurs (at least on desktop SL; not sure about WP7) when the Thread.CurrentUICulture is set to the invariant culture. Be sure it is set to a specific culture (consider also setting Thread.CurrentCulture) in the App.Startup event handler, e.g.

    System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en-US");
    

    You do still need AppID set, of course.

    0 讨论(0)
提交回复
热议问题