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();
}