ThinkGeo.com    |     Documentation    |     Premium Support

S57FeatureLayer Question

Good day.


I have a question.


I want to  use "S57FeatureLayer" library.


Used in this library to demo version can not do?


thanks for your advice.


Best regards.



Hello TaeYoung,


Thanks for your post, S57FeatureLayer is working good at demo version too, what's the problem are you met?


Here I can show you some sample code to use it, also please remember you need to refer the FdoExtention.dll into your projet.



S57FeatureLayer worldLayer = new S57FeatureLayer(@"D:\MapData\OneDay_ENCs\ENC_ROOT\US2EC03M\US2EC03M.000", null, "OGRSchema", "Point");
worldLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1;
worldLayer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.City1;
worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;

worldLayer.Open();
Map1.CurrentExtent = worldLayer.GetBoundingBox();
// Here you can get all features with their column values.
Collection<Feature> features = worldLayer.QueryTools.GetAllFeatures(ReturningColumnsType.AllColumns);
worldLayer.Close();

LayerOverlay layerOverlay = new LayerOverlay();
layerOverlay.Layers.Add(worldLayer);
Map1.Overlays.Add(layerOverlay);

Map1.Refresh();

Regards,


Gary