ComponentOne Maps for UWP
In This Topic
    Quick Reference
    In This Topic

    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>