顯示地圖控件我有一個控制文件夾,如下圖所示: XAML:C# - 不能使用Bing地圖
<Maps:MapControl x:Name="MapControl" Grid.Row="5" Grid.ColumnSpan="2" Margin="20,10,15,15" Visibility="Visible"
Height="200" HorizontalAlignment="Left" VerticalAlignment="Top" BorderBrush="Black" BorderThickness="1"/>
代碼:
MapControl.MapServiceToken = "MyMapToken";
ListingClass listing = new ListingClass();
listing.Latitude = Double.Parse("-7.78183620", CultureInfo.InvariantCulture);
listing.Longitude = Double.Parse("110.40856360", CultureInfo.InvariantCulture);
// Specify a known location.
BasicGeoposition snPosition = new BasicGeoposition() { Latitude = listing.Latitude, Longitude = listing.Longitude };
Geopoint snPoint = new Geopoint(snPosition);
// Create a MapIcon.
MapIcon mapIcon1 = new MapIcon();
mapIcon1.Image =
RandomAccessStreamReference.CreateFromUri(new Uri("ms-appx:///images/map-pin-red-md1.png"));
mapIcon1.Location = snPoint;
mapIcon1.NormalizedAnchorPoint = new Point(0.5, 1.0);
mapIcon1.Title = pageTitle.Text;
mapIcon1.ZIndex = 0;
// Add the MapIcon to the map.
MapControl.MapElements.Add(mapIcon1);
// Center the map over the POI.
MapControl.Center = snPoint;
MapControl.ZoomLevel = 14;
MapControl.LandmarksVisible = true;
我有麻煩,即無法顯示文件夾(只有白頁)。如何處理它?
我想問一個免費的bing開發者許可證,可以使用大地圖的應用程序數量是否有限制? 因爲在之前的應用程序中可以顯示bing map(我根據應用程序的名稱使用不同的鍵)。