我正在为windows phone制作应用程序,我正在使用windows phone工具包将标记显示到地图覆盖中。但是当我将地理坐标绑定到UserLocationMarker时,它会显示标记,但是当我移动地图视图时,跟随它的标记并留在我的地图中心
<maps:Map Height="250" x:Name="MyMap" Grid.ColumnSpan="2" Grid.RowSpan="2"
Center="{Binding centerGeo, Mode=TwoWay}"
ZoomLevel="{Binding zoomLevel, Mode=TwoWay}"
dp:MapPushPinDependency.ItemsSource="{Binding hereRest}">
<maptk:MapExtensions.Children>
<maptk:MapItemsControl Name="Items">
<maptk:MapItemsControl.ItemTemplate>
<DataTemplate>
<maptk:Pushpin x:Name="MyPushpin"
Tap="MyPushpin_Tap" Tag="{Binding href}"
GeoCoordinate="{Binding coordinate}"
Background="{StaticResource PhoneAccentBrush}"
Opacity="0.7">
<maptk:Pushpin.Content>
<Border Background="{StaticResource PhoneAccentBrush}" Width="200" Visibility="Visible"
x:Name="borderData" HorizontalAlignment="Center" Opacity="0.7" >
<StackPanel Orientation="Horizontal">
<Image Source="{Binding iconPathSquare}" Stretch="Uniform" Width="50" />
<StackPanel>
<TextBlock Text="{Binding title}"
Style="{StaticResource PhoneTextNormalStyle}"
TextWrapping="Wrap"/>
<TextBlock Text="{Binding distance, StringFormat=\{0:0 m\}}"
TextWrapping="Wrap"
Style="{StaticResource PhoneTextSubtleStyle}"/>
</StackPanel>
</StackPanel>
</Border>
</maptk:Pushpin.Content>
</maptk:Pushpin>
</DataTemplate>
</maptk:MapItemsControl.ItemTemplate>
</maptk:MapItemsControl>
<maptk:UserLocationMarker x:Name="UserLocationMarker"
GeoCoordinate="{Binding centerGeo}" />
</maptk:MapExtensions.Children>
</maps:Map>