我正在開發一款Windows Phone 8應用程序的內容,我都放在XAML頁面上的地圖的控制,而在模擬器中運行它只是在地方的地圖的藍色方形框顯示。WP8模擬器上不顯示地圖
輸出屏幕:https://docs.google.com/file/d/0By0Y-Dca1cKjVG1QQUY3MVBQcFk/edit?usp=sharing
MainPage.xaml中
<phone:PhoneApplicationPage
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:maps="clr-namespace:Microsoft.Phone.Maps.Controls;assembly=Microsoft.Phone.Maps"
x:Class="MapTestApp.MainPage"
mc:Ignorable="d"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
shell:SystemTray.IsVisible="False">
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!--TitlePanel contains the name of the application and page title-->
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}" Margin="12,0"/>
<TextBlock Text="Bing Map" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>
<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<maps:Map />
</Grid>
</Grid>
</phone:PhoneApplicationPage>
MainPage.xaml.cs中
public MainPage()
{
InitializeComponent();
Map MyMap = new Map();
MyMap.Center = new GeoCoordinate(47.6097, -122.3331);
MyMap.ZoomLevel = 3;
MyMap.LandmarksEnabled = true;
MyMap.PedestrianFeaturesEnabled = true;
MyMap.CartographicMode = MapCartographicMode.Aerial;
ContentPanel.Children.Add(MyMap);
}
看起來像它顯示你的海洋。你能縮小,還是縮小地圖? –
我已經將zoomlevel設置爲3,所以在那個縮放級別我不認爲有海洋。 –
我試過滾動,但我沒有在地圖上找到任何改變。所以我不能說它正在滾動。 –