0
votes

I am in the process of migrating my windows phone 8 Silverlight app to windows phone 8.1 runtime. Before I was able to use the windows phone toolkit to display push pins. I have not found any documentation on how to this with windows phone runtime. Any resources or solutions.

Thanks in advance

1

1 Answers

0
votes

You can check out the new map docs. There any now a few ways to add push pins to the map. You can add MapIcons through code to the MapElements collection (I have yet to get a collection of MapIcons binding in xaml).

Map.MapElements.Add(new MapIcon());

You can bind a collection of places using the MapItemsControl. You can place any xaml in the ItemTemplate of the control.

<maps:MapControl x:Name="Map" MapServiceToken="abcdef-abcdefghijklmno">
    <maps:MapItemsControl ItemsSource="{Binding Locations}">
        <maps:MapItemsControl.ItemTemplate>
            <DataTemplate>
                <Image Source="Assets/Mappin.png" Height="25"
                        maps:MapControl.NormalizedAnchorPoint="1,0.5" 
                        maps:MapControl.Location="{Binding Geopoint}" />
            </DataTemplate>
        </maps:MapItemsControl.ItemTemplate>
    </maps:MapItemsControl>
</maps:MapControl>

Hope that helps.