Hello.
first, I’m learning English now and my English is still not so good.
I’m Test S57 Layer load sample.
But not working.(only view backgroundbrush)
S57StyleFactory is thinkgeo wpf sample code.
Can I get the S57 sample project at MVC Version?
and please check my mistake.
Best regards.
my Test Code.
Index.cshtml
@using ThinkGeo.MapSuite.MvcEdition
@using ThinkGeo.MapSuite.Core
controller.cs
Map __map;
public ActionResult Index()
{
__map = new Map("VMS",
new System.Web.UI.WebControls.Unit(100, System.Web.UI.WebControls.UnitType.Percentage),
new System.Web.UI.WebControls.Unit(100, System.Web.UI.WebControls.UnitType.Percentage));
S57FeatureLayer layer = new S57FeatureLayer(Server.MapPath("~/App_Data/US1HA02M/US1HA02M.000"));
layer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(S57StyleFactory.GetMaritimeStyle());
layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
try
{
layer.Open();
LayerOverlay overlay = new LayerOverlay();
overlay.TileType = TileType.SingleTile;
overlay.IsBaseOverlay = true;
overlay.Name = @"BaseMap";
overlay.Layers.Add(layer);
__map.CurrentExtent = new RectangleShape(123.84, 39.0, 131.53, 33.4);
__map.MapTools.ScaleLine.Enabled = false;
__map.MapBackground.BackgroundBrush = new GeoSolidBrush(GeoColor.FromHtml("#d8f4e1"));
__map.MapUnit = GeographyUnit.DecimalDegree;
__map.CustomOverlays.Add(overlay);
layer.Close();
}
catch(Exception e)
{
Console.WriteLine(e.ToString());
}
return View(__map);
}