将筛选到的记录集(有数据)加入到图层选择集中,但是地图没有高亮显示。请问是bug还是什么原因? 怎么解决?
组件版本:supermap-iobjectsdotnet-10.0.0-17726-74479
foreach (Layer layer in mapControl.Map.Layers)
{
if (layer.Dataset.Name.ToLower() == datasetName)
{
string filter = $"guid = '{rowid}'";
DatasetVector dv = (layer.Dataset as DatasetVector);
recordset = dv.Query(filter, CursorType.Static);
Selection selection = layer.Selection;
selection.FromRecordset(recordset);
layer.Selection = selection;
mapControl.Map.EnsureVisible(recordset);
mapControl.Map.Refresh();
break;
}
}