Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
How to add Symbol on XamMap
posted

Hello, I'm trying to add a simple simple in a geographical location (lat, lon) using the following code, but nothing appears. Note that the shape file renders correctly on the control. What am I doing wrong?):

<ig:XamMap Grid.Column="2" x:Name="MapMain">

                <ig:XamMap.Layers>

                    <ig:MapLayer x:Name="BasicLayer">

                        <ig:MapLayer.Reader>

                            <ig:ShapeFileReader x:Name="BasicShapeReader" Uri="Maps\ShapeFiles\sample"/>

                        </ig:MapLayer.Reader>

                    </ig:MapLayer>

                </ig:XamMap.Layers>

            </ig:XamMap>

 

 

 Private Sub ShowSymbol()

        Dim symbolPoint As Point = MapMain1.MapProjection.ProjectToMap(New Point(23.15, 42.27))

 

        Dim element As New SymbolElement()

        element.SymbolOrigin = symbolPoint

        element.Caption = "myCaption"

        element.SymbolType = MapSymbolType.Bubble

        element.SymbolSize = 20

 

        MapMain.Layers(0).Elements.Add(element)

    End Sub

Parents Reply Children
No Data