2016-02-15 65 views
1

我在windows phone 8.1上使用bing地圖。我使用圖像對象作爲引腳。bing地圖上的移動引腳

  var img = new Image(); 
      img.Width = 40; 
      img.Height = 160; 
      //img.Margin = new Thickness(-100,-100,0,0); 
      switch (location.Type) 
      { 
       case 1: 
        { 

         var bmp = new BitmapImage(); 
         bmp.UriSource = new Uri("ms-appx:///Assets/[email protected]"); 
         img.Source = bmp; 
         break; 
        } 
       case 2: 
        { 
         var bmp = new BitmapImage(); 
         bmp.UriSource = new Uri("ms-appx:///Assets/[email protected]"); 
         img.Source = bmp; 
         break; 
        } 
       case 3: 
       default: 
        { 
         var bmp = new BitmapImage(); 
         bmp.UriSource = new Uri("ms-appx:///Assets/[email protected]"); 
         img.Source = bmp; 
         break; 
        } 
      } 
      MapControl.Children.Add(img); 

      var position = new BasicGeoposition(); 
      position.Latitude = location.Latitude; 
      position.Longitude = location.Longtitude; 

      MapControl.SetLocation(img, new Geopoint(position)); 
      MapControl.SetNormalizedAnchorPoint(img, new Point(0.5,0.5)); 
     } 

這是處理引腳添加的代碼。 但是,當將引腳放置在地圖上,並且我在地圖上移動時,引腳在地圖上移動時會「搖晃」(從左到右和從上到下移動一點)。當我停止在地圖上移動時,這種不穩定的事情就會消失。

我在做什麼錯?

回答

1

我認爲這是一個已知的問題,當在WP8.1地圖控件上覆蓋XAML控件時。請注意,WP8.1地圖不是Bing地圖,而是HERE地圖。