2

WinRT で bing マップを使用しています。pushpin_click イベントが発生したときに翻訳を作成して、マップの中央にある現在タップされている画鋲を翻訳したいと考えています。

private void Pushpin_Click(object sender, TappedRoutedEventArgs e)
{
     var TappedPin = (Pushpin)sender;
     Location currentPinLocation = GetPushpinLocation(TappedPin);
     Map.Center = currentPinLocation;  //How can I make a translation animation?
}

C#でプログラム的にそれを実現する方法はありますか?

4

1 に答える 1

4

あなたはとても近くにいます。MapLayer クラスを使用して画鋲の位置を取得し、マップのビューを次のように設定するだけです。

private void Pushpin_Click(object sender, TappedRoutedEventArgs e)
{
     var TappedPin = sender as Pushpin;
     Location currentPinLocation = MapLayer.GetPosition(TappedPin);
     Map.SetView(currentPinLocation);  
}
于 2013-07-03T16:52:39.893 に答える