创建BingMap控件的密钥后,凭据无效

时间:2015-09-18 20:57:17

标签: c# wpf visual-studio visual-studio-2013

我想在C#中使用BingMap。

我创建了一个WPF项目,并通过添加Microsoft.Maps.MapControl.WPF来使用BingMap。

我还在https://www.bingmapsportal.com/Application#

创建了一个密钥

但是,当我运行WPF项目时,我收到了错误:

invalid credential. sign up for a developer account at maicrosoft.com/maps/developers

然后我创建了一个新密钥并且工作正常。大约一个小时后,我得到了同样的错误。

这是我的MainWindow.xaml:

<Window x:Class="draw_a_map.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:m="clr-namespace:Microsoft.Maps.MapControl.WPF;assembly=Microsoft.Maps.MapControl.WPF"
    Title="MainWindow" Height="350" Width="525">
<Grid>
    <m:Map CredentialsProvider="<my key>" Margin="0,0,0,-10"/>
</Grid>

的解决方案

不适合我。

任何帮助都将不胜感激。

0 个答案:

没有答案
相关问题