问题描述:根据list中已有的值,将对应的地图上的面进行高亮起来,目前不知道怎么设置几何元素或者可以用什么方法能够实现
if (this.selectedProvinces.Count != 0)
{
Recordset recordset = this.importResult.GetRecordset(true, CursorType.Static);
SuperMap.Data.Geometry geo = recordset.GetGeometry(); // 获取几何对象
SuperMap.Data.Geometry geometry = geo; // 复制几何对象
GeoStyle geostyle = new GeoStyle(); // 创建几何样式对象
foreach (var element in this.selectedProvinces)
{
geostyle.FillForeColor = System.Drawing.Color.Blue; // 填充颜色为蓝色
geostyle.FillOpaqueRate = 100; // 设置填充不透明度为100
geometry.Style = geostyle; // 应用样式到几何对象
this.mapControl.Map.TrackingLayer.Add(geometry, element);
}
}
高亮,