Windows phone 8 如何通过地图将图像添加到位置(windows phone 8)

Windows phone 8 如何通过地图将图像添加到位置(windows phone 8),windows-phone-8,Windows Phone 8,我正在学习这个例子 但我的问题是 1> 我需要将图像添加到位置点,而不是颜色 2> 我想在弹出窗口中显示详细信息,如谷歌地图,这可能会对您有所帮助。 在这里,我使用textblock来显示自定义数据。堆栈面板的背景图像 Private void ShoeCustomPushPuin() { Pushpin pushPin = null; StackPanel stackPanel = null; TextBloc

我正在学习这个例子 但我的问题是

1> 我需要将图像添加到位置点,而不是颜色

2> 我想在弹出窗口中显示详细信息,如谷歌地图,这可能会对您有所帮助。 在这里,我使用textblock来显示自定义数据。堆栈面板的背景图像

      Private void ShoeCustomPushPuin()
{
            Pushpin pushPin = null;
            StackPanel stackPanel = null;
            TextBlock txtblkDownloadSpeed = null;
            TextBlock txtblkUploadSpeed = null;
            GeoCoordinate cordinates = null;

            try
            {
                cordinates = new GeoCoordinate();
                pushPin = new Pushpin();
                stackPanel = new StackPanel();
                txtblkDownloadSpeed = new TextBlock();

                txtblkUploadSpeed = new TextBlock();
                cordinates.Latitude = Your latitude value;
                cordinates.Longitude = your longitude value;
                txtblkUploadSpeed.Text = your data;
                txtblkDownloadSpeed.Text =your data;
                ImageBrush imgbrush= new ImageBrush
                    {
                ImageSource = new BitmapImage(new Uri("your background image path",     UriKind.Relative)),
            };

                stackPanel.Background = imgbrush;

                stackPanel.Children.Add(txtblkDownloadSpeed);
                stackPanel.Children.Add(txtblkUploadSpeed);
                pushPin.Content = stackPanel;
                pushPin.GeoCoordinate = cordinates;

                MapOverlay overlay = new MapOverlay
                {
                    GeoCoordinate = cordinates,
                    Content = pushPin
                };

                MapLayer layer = new MapLayer();
                layer.Add(overlay);
                mapHistory.Center = cordinates;
                mapHistory.Layers.Add(layer);
            }
            catch (Exception ex)
            {
            }
}

好的,让我们看看你迄今为止的努力。