Windows phone mango を使用した bing マップでのルーティングに問題があります。ユーザーが毎回検索をクリックすると、古いパスを削除してマップを更新する必要があります。私は次のガイドを使用しました: http://msdn.microsoft.com/en-us/library/ee681887.aspxそれは動作しますが、マップを再度検索すると古いパスのままです。助けてくれてありがとう!
1 に答える
2
問題を解決しました。私は xaml マップに属性 MapPolyline "percorso" を挿入しました。これはコード c# です
// If the route calculate was a success and contains a route, then draw the route on the map.
if ((e.Result.ResponseSummary.StatusCode == BingMapRouteService.ResponseStatusCode.Success) & (e.Result.Result.Legs.Count != 0))
{
this.percorso.Locations = new LocationCollection();
// Retrieve the route points that define the shape of the route.
foreach (Location p in e.Result.Result.RoutePath.Points)
{
Location location = new Location();
location.Latitude = p.Latitude;
location.Longitude = p.Longitude;
this.percorso.Locations.Add(location);
}
于 2012-11-22T09:02:29.967 に答える