문제

I'm new to windows phone 8 application. Could you please help me how to show a Map with pushpin for the given Latitude and Longitude in windows phone 8.

Thanks

도움이 되었습니까?

해결책 2

This will use a Grid inside a MapOverlay, and works pretty well...

 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);

다른 팁

To learn about maps and navigation click here this is the official document from windows phone dev center. If you are trying to add some UI element to the maps refer this document click here.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top