C# 显示mvvm Rest Web服务中的图钉
我正在使用windows phone toolkit,并希望使用图钉地图功能来显示从rest api接收到的每个位置数据的图钉,但它只是不显示任何内容 这是我的xamlC# 显示mvvm Rest Web服务中的图钉,c#,xaml,mvvm,windows-phone,pushpin,C#,Xaml,Mvvm,Windows Phone,Pushpin,我正在使用windows phone toolkit,并希望使用图钉地图功能来显示从rest api接收到的每个位置数据的图钉,但它只是不显示任何内容 这是我的xaml <maps:Map Height="250" Grid.Row="1" x:Name="MyMap"> <maptk:MapExtensions.Children> <maptk:MapItemsControl Name="RestaurantItems">
<maps:Map Height="250" Grid.Row="1" x:Name="MyMap">
<maptk:MapExtensions.Children>
<maptk:MapItemsControl Name="RestaurantItems">
<maptk:MapItemsControl.ItemTemplate>
<DataTemplate>
<maptk:Pushpin GeoCoordinate="{Binding hereRestProperty.coordinate}" Content="{Binding hereRestProperty.Vicinity}" />
</DataTemplate>
</maptk:MapItemsControl.ItemTemplate>
</maptk:MapItemsControl>
<maptk:UserLocationMarker GeoCoordinate="{Binding hereRestProperty.coordinate}" x:Name="UserLocationMarker" Visibility="Visible" />
</maptk:MapExtensions.Children>
</maps:Map>
下面是我如何处理hererestjson文件的
public class Item
{
public List<double> position { get; set; }
public GeoCoordinate coordinate
{
get
{
return new GeoCoordinate(position[0], position[1]);
}
}
}
公共类项目
{
公共列表位置{get;set;}
公共地理坐标
{
得到
{
返回新的地理坐标(位置[0],位置[1]);
}
}
}
我已经在使用inotifyproperty更改方法。重复[MVVM Windows Phone 8-向地图添加图钉集合][1][1]:哇,谢谢您的帮助