winformsMap1.MapUnit = GeographyUnit.DecimalDegree; Feature line1 = new Feature("LINESTRING (100 100, 20 180)"); line1.ColumnValues["id"] = "1"; Feature line2 = new Feature("LINESTRING (100 80, 20 160)"); line2.ColumnValues["id"] = "2"; ValueItem valueItem1 = new ValueItem("1", LineStyles.Canal1); ValueItem valueItem2 = new ValueItem("2", LineStyles.Highway1); ValueStyle valueStyle = new ValueStyle(); valueStyle.ColumnName = "id"; valueStyle.ValueItems.Add(valueItem1); valueStyle.ValueItems.Add(valueItem2); InMemoryFeatureLayer inmLayer = new InMemoryFeatureLayer(); inmLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; inmLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(valueStyle); inmLayer.InternalFeatures.Add(line1); inmLayer.InternalFeatures.Add(line2); inmLayer.Open(); inmLayer.Columns.Add(new FeatureSourceColumn("id")); inmLayer.Close(); LayerOverlay ov = new LayerOverlay(); ov.Layers.Add(inmLayer); winformsMap1.Overlays.Add(ov); winformsMap1.CurrentExtent = new RectangleShape(-180, 90, 180, -90); winformsMap1.Refresh();