0

我有MapItemsControlPushpins和数据绑定:

 <toolkit:MapItemsControl>
                    <toolkit:MapItemsControl.ItemTemplate>
                        <DataTemplate>
                            <toolkit:Pushpin GeoCoordinate="{Binding Coordinate}" 
                                             Content="{Binding ContentPushpin}"
                                             Background="{Binding Background}"  
                                             Tag="{Binding Tag}"   
                                             Tap="userPushpin_Tap"                                                
                                             >                                      
                             </toolkit:Pushpin>
                        </DataTemplate>
                    </toolkit:MapItemsControl.ItemTemplate>                        
                </toolkit:MapItemsControl>

将图钉绑定到MapItemsControl

ObservableCollection<MyPushpin> PushpinsCollections = ObservableCollection<MyPushpin>();

PushpinsCollections.Add(new MyPushpin()
{
   Coordinate = ....,
   Id = ... 
   //init other properties
});

NokiaMapItemsControl.ItemsSource = PushpinsCollections;

接下来,其中一个已Pushpin更改的坐标,我可以通过唯一 ID 在集合中找到它。但是我怎样才能改变他在地图上出现这些变化的位置,而不重新绘制其他图钉呢?

4

0 回答 0