Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xaml UserLocationMarker不是静态的_Xaml_Windows Phone 8_Windows Phone - Fatal编程技术网

Xaml UserLocationMarker不是静态的

Xaml UserLocationMarker不是静态的,xaml,windows-phone-8,windows-phone,Xaml,Windows Phone 8,Windows Phone,我正在为windows phone制作应用程序,我正在使用windows phone toolkit将标记显示到地图覆盖中。但当我将地理坐标绑定到UserLocationMarker时,它会显示标记,但当我移动地图视图时,标记会跟随它并停留在地图的中心 <maps:Map Height="250" x:Name="MyMap" Grid.ColumnSpan="2" Grid.RowSpan="2" Center="{Binding centerGeo, Mode=T

我正在为windows phone制作应用程序,我正在使用windows phone toolkit将标记显示到地图覆盖中。但当我将地理坐标绑定到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>

您的属性centerGeo更新了吗?您的代码是什么样子的?是的,centerGeo已更新,我已经将InotifyPropertyChanged放入其中