I have a problem to convert code from Edition 2 to 3. This code worked in Edition2:
Dim fname As String = Path.GetFileNameWithoutExtension(Me.OpenFileDialog1.FileName).ToUpper
Dim layer As MapSuite.Layer = New MapSuite.Layer(OpenFileDialog1.FileName, mRotated, True)
layer.Name = fname
layer.ZoomLevel01.GeoStyle = MapSuite.GeoLineStyles.Railway1
layer.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.ZoomLevel18
I read quite a few LONGITUDEs and LATITUDEs, convert the points into a line and save it in a shapefile.
Then I want to display the shapefile. I tried this code, but the line does not display at all.
Can you please help me with the correct code?
vertexCollection = New System.Collections.Generic.List(Of MapSuite.Core.Vertex)
Dim dictionaryColumn As New System.Collections.Generic.Dictionary(Of String, String)
'this is in a loop
While
'get the values from a dataset
vertex.X = pointsRow.LONGITUDE
vertex.Y = pointsRow.LATITUDE
vertexCollection.Add(vertex)
End While
lineShape = New MapSuite.Core.LineShape(vertexCollection)
dictionaryColumn.Add("SECTION", pointsRow.SECTION.ToString)
shapeFile.AddFeature(lineShape, dictionaryColumn)
'display the shapefile
layer.Name = fname
layer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = MapSuite.Core.LineStyles.Railway1