首页 / 浏览问题 / 桌面GIS / 问题详情
selection GeoStyle 设置的问题
131EXP 2017年01月09日
在做数据集查询的功能中发现,改变不了查找到的数据集的显示样式,代码如何,应该如何更改(数据集是线数据),谢谢

 GeoStyle style = new GeoStyle();
 style.LineColor = Color.Green;
 style.LineWidth = 4.0;
 m_targetLayer.Selection.FromRecordset(_recordset);
 m_targetLayer.Selection.Style = style;

  (SuperMap.Desktop.Application.ActiveForm as IFormMap).MapControl.Map.Refresh();
  (SuperMap.Desktop.Application.ActiveForm as IFormMap).MapControl.Refresh();

1个回答

需要设置Selection.IsDefaultStyleEnabled = false;

需要将是否使用默认的选择集风格设置为false,默认true;
4,620EXP 2017年01月09日
谢谢,试一下之后的确可以了
不客气,如果已经解决了该问题,可以点一下上面的小勾对该回复采纳一下
...