Hi,
I used the code from the S57FeatureLayerSample project to try and display the sample S57data but have had no luck. One of the issues is that Map.Image = Bitmap is no longer supported so I changed Map.Image to Map.BackgroundImage = Bitmap. When I load the application i just get a white screen.
Imports ThinkGeo.MapSuite.Core
Public Class Form1
Private MapEngine As MapEngine = New MapEngine()
Private Bitmap As Bitmap = Nothing
Private FullExtent As RectangleShape = Nothing
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Dim Layer As FdoFeatureLayer = New TabFeatureLayer
ClearLayers()
'Set the background color.
MapEngine.BackgroundFillBrush = New GeoSolidBrush(GeoColor.GeographicColors.DeepOcean)
Dim MarineChartLayer As S57FeatureLayer = New S57FeatureLayer("C:\Sample ThinkGEO Apps\ExtendingMapSuite_FDOSamples\FDO Samples\SampleData\IHO S-57 (ENC)\GB4X0000.000", Nothing, Nothing, "Area")
MarineChartLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1
MarineChartLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20
'Set the CurrentExtent to Full extent.
MarineChartLayer.Open()
FullExtent = MarineChartLayer.GetBoundingBox()
MarineChartLayer.Close()
MapEngine.CurrentExtent = ExtentHelper.GetDrawingExtent(FullExtent, Map.Width, Map.Height)
'Add the new layers to the MapEngine.
MapEngine.StaticLayers.Add("MarineChartLayer", MarineChartLayer)
DrawImage()
End Sub
Private Sub ClearLayers()
If MapEngine.StaticLayers.Count > 0 Then
For Each Layer In MapEngine.StaticLayers
Layer.Close()
Next
End If
MapEngine.StaticLayers.Clear()
End Sub
Private Sub DrawImage()
If IsNothing(Bitmap) = False Then
Bitmap.Dispose()
End If
Bitmap = New Bitmap(Map.Width, Map.Height)
MapEngine.OpenAllLayers()
MapEngine.DrawStaticLayers(Bitmap, GeographyUnit.Meter)
MapEngine.CloseAllLayers()
Map.Image = Bitmap
End Sub
End Class