Windows phone 8 如何在windows phone 8中使用图钉显示给定纬度和经度的地图
我不熟悉windows phone 8应用程序您能否帮助我在windows phone 8中如何显示给定纬度和经度的图钉地图。Windows phone 8 如何在windows phone 8中使用图钉显示给定纬度和经度的地图,windows-phone-8,map,latitude-longitude,pushpin,Windows Phone 8,Map,Latitude Longitude,Pushpin,我不熟悉windows phone 8应用程序您能否帮助我在windows phone 8中如何显示给定纬度和经度的图钉地图。 感谢您学习地图和导航 这是windows phone开发中心的官方文档。如果您试图在地图中添加一些UI元素,请参阅本文档。这将在地图覆盖中使用网格,效果非常好 var textGrid = new Grid(); textGrid.ColumnDefinitions.Add(new ColumnDefinition(){Width = GridLength.Auto}
感谢您学习地图和导航
这是windows phone开发中心的官方文档。如果您试图在地图中添加一些UI元素,请参阅本文档。这将在地图覆盖中使用网格,效果非常好
var textGrid = new Grid();
textGrid.ColumnDefinitions.Add(new ColumnDefinition(){Width = GridLength.Auto});
textGrid.Background = new SolidColorBrush(Colors.Black){Opacity = 0.7};
var distText = new TextBlock();
distText.Margin = new Thickness(8,4,8,4);
distText.Text = <your text>;
distText.Foreground = new SolidColorBrush(Colors.White);
textGrid.Children.Add(distText);
var textOverlay = new MapOverlay { Content = textGrid, GeoCoordinate = midwayCoord };
var layer = new MapLayer();
layer.Add(textOverlay);
Map.Layers.Add(layer);
Map.MapElements.Add(line);
var textGrid=new Grid();
textGrid.ColumnDefinitions.Add(newColumnDefinition(){Width=GridLength.Auto});
textGrid.Background=newsolidColorBrush(Colors.Black){Opacity=0.7};
var distText=new TextBlock();
边距=新厚度(8,4,8,4);
Text=;
distText.前台=新的SolidColorBrush(Colors.White);
textGrid.Children.Add(distText);
var textOverlay=new MapOverlay{Content=textGrid,GeoCoordinate=midwayCoord};
var layer=新的映射层();
添加(文本叠加);
Map.Layers.Add(层);
Map.MapElements.Add(行);