Maps for WinRT
Quick Reference

This topic is dedicated to providing a quick overview of the XAML used to complete various tasks.

Item Template

The following example illustrates how to use the maps item template:

Markup
Copy Code
<c1:C1Maps x:Name="C1Maps1" FadeInTiles="False" Margin="0,0,235,8" TargetCenter="-65,-25" Center="-58,-25" Zoom="2" Foreground="Aqua" Xaml:C1NagScreen.Nag="True">
            <c1:C1Maps.Resources>
                <!-- Template -->
                <DataTemplate x:Key="templPts">
                    <c1:C1VectorPlacemark GeoPoint="{Binding Path=LongLat}" Fill="Aqua" Stroke="Aqua" Label="{Binding Path=Name}" LabelPosition="Top" >
                        <c1:C1VectorPlacemark.Geometry>
                           <EllipseGeometry RadiusX="2" RadiusY="2" />
                        </c1:C1VectorPlacemark.Geometry>
                    </c1:C1VectorPlacemark>
                </DataTemplate>
            </c1:C1Maps.Resources>
            <c1:C1VectorLayer ItemsSource="{Binding}" ItemTemplate="{StaticResource templPts}" HorizontalAlignment="Right" Width="403" />
            </c1:C1Maps>

 

Vector Layer Label

The following example illustrates how to create labels using the vector layer:

Markup
Copy Code
<c1:C1VectorLayer>
<c1:C1VectorPlacemark LabelPosition="Left" GeoPoint="-80.107008,42.16389" StrokeThickness="2" Foreground="#FFEB1212" PinPoint="-80.010866,42.156831" Label="Erie, PA"/>
</c1:C1VectorLayer>
VectorLayer – Polyline
The following example illustrates how to create a polyline (an open line) using the vector layer:
<c1:C1VectorLayer Margin="2,0,-2,0">
     <c1:C1VectorPolyline Points="-80.15,42.12 -123.08,39.09, -3.90,30.85" StrokeThickness="3" Stroke="Red">
     </c1:C1VectorPolyline>
</c1:C1VectorLayer>
Vector Layer – Polygon
The following example illustrates how to create a polyline (a line that creates a shape) using the vector layer:
<c1:C1VectorLayer Margin="2,0,-2,0">
     <c1:C1VectorPolygon Points="-80.15,42.12 -123.08,39.09, -3.90,30.85" StrokeThickness="3" Stroke="Red">
     </c1:C1VectorPolygon>
</c1:C1VectorLayer>

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback