Hi, i need some help
I'm trying to load a topography data into ultrageographicmap usign polylineseries, the user has to select the *.shp file and the app has to show it in the map.
My first attemp was loading the original shapefile, but it had elevation data...after researching the control documentation and other forums i realized that ultrageographicmap only supports some shapetypes. (by the way the error was "corrupted file")
i had to download QGIS software in order to convert 3D shapefile to 2D shapefile, when i load into the app is not throwing errors, everything seems ok, but after all the map is not showing anything... the file is OK because it was opened in other specialized software
some ideas why? i don't know if the error is related to CRS (Coordinate Reference Systema) but i did'nt find anything about it in documentation.
I cannot attached my shapefile because it has 4.72 MB
some code
-----------------------
Private Sub btnShpFile_Click(sender As Object, e As EventArgs) Handles btnShpFile.Click
Try
If OpenFileDialog1.ShowDialog = DialogResult.OK Then Dim ruta = OpenFileDialog1.FileName
shapefileConverter = New ShapefileConverter()
shapefileConverter.ShapefileSource = New Uri(ruta, UriKind.Absolute) shapefileConverter.DatabaseSource = New Uri(Path.ChangeExtension(ruta, "dbf"), UriKind.Absolute)
End If Catch ex As Exception Debug.Print("Error") End Try End Sub
Private Sub OnShapefileConverterImportCompleted(sender As Object, e As System.ComponentModel.AsyncCompletedEventArgs) Handles shapefileConverter.ImportCompleted Try Dim MyPolyLineSeries As New GeographicPolylineSeries
Dim converter = TryCast(sender, ShapefileConverter) If converter Is Nothing Then Return End If
' Set the series data source MyPolyLineSeries.DataSource = converter
' Setup the series properties MyPolyLineSeries.Outline = New SolidColorBrush(Color.Blue) MyPolyLineSeries.ShapeMemberPath = "Points"
If Me.UltraGeographicMap1.Series?.Count > 0 Then Me.UltraGeographicMap1.Series.Remove(Me.UltraGeographicMap1.Series.Item(0))
Me.UltraGeographicMap1.Series.Add(MyPolyLineSeries)
converter = Nothing
Catch ex As Exception Debug.Print("Error") End Try