我正在尝试在Windows Phone 7设计部分创建添加地图。但我遵循了所有程序。 如果我从工具箱拖动地图控件,地图将不会显示在设计部分中。即使我给了凭证提供者。地图没有显示。我附上截图请帮忙。
这是我的代码:
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,154,0,12">
<my:Map Height="524"
HorizontalAlignment="Left"
Name="map1"
VerticalAlignment="Top"
Width="474"
CredentialsProvider="Aj53qt4Oulu0Ez0IVGdNvTVy-swLfo7vCexVzJXJq7hGj1sBYTfSu2t4bPLero2P">
<!--Enter your bing map key here-->
<my:Pushpin Name="pin" Background="Transparent" Visibility="Visible">
<my:Pushpin.Content>
<Ellipse Width="20" Height="15" Name="elps" />
</my:Pushpin.Content>
</my:Pushpin>
</my:Map>
<Button Content="+" Height="72" HorizontalAlignment="Left" Margin="0,52,0,0" Name="button1" VerticalAlignment="Top" Width="72" Background="#00270D0D" FontWeight="Bold" BorderBrush="#FF3CAD0A" Foreground="#FFF62A15" FontSize="28" Click="button1_Click" />
<Button Content="-" Height="72" HorizontalAlignment="Left" Margin="0,132,0,0" Name="button2" VerticalAlignment="Top" Width="72" Background="#00270D0D" FontWeight="Normal" Foreground="#FFE61919" BorderBrush="#FF1FAA49" FontSize="28" Click="button2_Click" />
</Grid>
<Button Content="Find" Grid.Row="1" Height="72" HorizontalAlignment="Left" Margin="0,83,0,0" Name="find" VerticalAlignment="Top" Width="160" Click="find_Click" />
<Button Content="Change view" Grid.Row="1" Height="72" HorizontalAlignment="Right" Margin="0,83,12,0" Name="view" VerticalAlignment="Top" Width="195" Click="view_Click" />
<TextBox Grid.Row="1" Height="72" HorizontalAlignment="Left" Margin="156,0,0,0" Name="txtbx" Text="" VerticalAlignment="Top" Width="312" />
<TextBlock Grid.Row="1" Height="57" HorizontalAlignment="Left" Margin="12,18,0,0" Name="textBlock1" Text="Enter Address" VerticalAlignment="Top" Width="148" TextAlignment="Center" FontSize="22" FontWeight="Bold" Foreground="#FF569E9C" />
</Grid>
![this is my screenshot.][1]
[1]: http://i.stack.imgur.com/0EBGj.jpg
答案 0 :(得分:1)
地图控件需要运行Web请求,而WP7设计器中不允许这样做。所以你什么也看不见。