在我的 WP7.5 应用程序中,用户可以导航到大学。他可以在地图上看到他通过扫描二维码获得的初始位置。地图图像是画布背景。一旦他选择了 X 和 Y 坐标已知的目的地,我如何在地图上绘制从用户当前位置到目的地的路线?我不知道这是否可能。
这是允许在地图上显示用户的起始位置的工作代码。
public void MarkLocation(ImageBrush imgmap, int posizioneX, int posizioneY)
{
Canvas.Background = imgmap;
Image imgmarker = new Image();
imgmarker.Source = new BitmapImage(new Uri("Images/marker.png", UriKind.Relative));
Canvas.SetLeft(imgmarker, posizioneX);
Canvas.SetTop(imgmarker, posizioneY);
Canvas.Children.Add(imgmarker);
}
我希望你能帮帮我!提前致谢。