winfrom Dataset 无法设置单个对象的样式

0 投票
winfrom Dataset 无法设置单个对象的样式 设置了对象的颜色为红色  但是显示的还是默认色 代码如下

DatasetVector datasetVector = CreateDataset("Region", DatasetType.Region);
            GeoRegion geoRegion = new GeoRegion();
            Point2Ds point2Ds = new Point2Ds();
            point2Ds.Add(new Point2D(114.10438438672989, 22.785617393491204));
            point2Ds.Add(new Point2D(114.10491067623667, 22.78493524212784));
            point2Ds.Add(new Point2D(114.10597390166231, 22.785825527135959));
            point2Ds.Add(new Point2D(114.10706940744896, 22.78641921785977));
            point2Ds.Add(new Point2D(114.10675789675562, 22.786745420986655));
            point2Ds.Add(new Point2D(114.10438438672989, 22.785617393491204));
            geoRegion.AddPart(point2Ds);
            geoRegion.Style = new GeoStyle();
            geoRegion.Style.FillBackColor = Color.Red;
            geoRegion.Style.FillForeColor = Color.Red;
            geoRegion.Style.LineColor = Color.Red;

            recordset = datasetVector.GetRecordset(false, CursorType.Dynamic);
            Dictionary<string, object> dic = new Dictionary<string, object>();
            dic.Add("id", "test");
            recordset.AddNew(geoRegion, dic);
            recordset.Update();
7月 15 分类:  33次浏览 | 用户: 回首那一抹云烟 初出茅庐 (74 分)

1个回答

0 投票
您好,如果您需要让数据集中的不同对象在地图图层中显示不同的颜色风格样式,应该使用自定义专题图功能的对应颜色属性实现。

接口:ThemeCustom

希望可以帮助到您!
7月 16 用户: 执笔画月 名扬四海 (1,640 分)
...