ThinkGeo.com    |     Documentation    |     Premium Support

Another problem at S57FeatureLayer Sample Test

Good day.

I was S57FeatureLayer API Test.

I want to draw a lot of S-57 File on map.

But an runtime error has occured.(System.AccessViolationException at MapSuiteCore.dll)

Please check if there code are mistakes.

Best regards.


==========================================================


@{            

            Html.ThinkGeo().Map("Map1", new System.Web.UI.WebControls.Unit(100, System.Web.UI.WebControls.UnitType.Percentage), 510)

                .MapBackground(new BackgroundLayer(new GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean)))

                .MapUnit(GeographyUnit.DecimalDegree)

                .CurrentExtent(122.0, 42.7, 134.0, 34.0) //(-162.94, 24.08, -154.81, 20.20)//

                .CustomOverlays(overlays => overlays.WorldMapKitWmsWebOverlay())                

                .CustomOverlays(overlays =>

                {

                    S57FeatureLayer layer = new S57FeatureLayer(Server.MapPath("~/App_Data/s57/KR1F0000.000"));

                    layer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(ThinkGeoSampleProject.S57StyleFactory.GetMaritimeStyle());

                    layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;

                    overlays.LayerOverlay().IsBaseOverlay(false).Layer("layer", layer);

                })

                .CustomOverlays(overlays =>

                {

                    S57FeatureLayer layer2 = new S57FeatureLayer(Server.MapPath("~/App_Data/s57/KR1G0000.000"));

                    layer2.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(ThinkGeoSampleProject.S57StyleFactory.GetMaritimeStyle());

                    layer2.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;


                    overlays.LayerOverlay().IsBaseOverlay(false).Layer("layer2", layer2);

                })

                .Render();

        }



Hi Binary, 
  
 We haven’t reproduced the issue by your code and original S57 file uploaded in last post. 
  
 So we think the problem caused by your dll files are not the latest. 
  
 Please download our latest 8.0.181.0 from our MapSuite 8.0 Product Center and re-install again, which will update your dlls. 
  
 Regards, 
  
 Don