通过QueryParameter查询到单个Recordset,将Recordset转为Geometry设置样式setStyle 样式不生效,图斑没有高亮
DatasetVector datasetvector = (DatasetVector) selectLayer.getDataset();
String strFilter = "SmID = '" + selectLayerId + "'";
QueryParameter parameter = new QueryParameter();
parameter.setAttributeFilter(strFilter);
parameter.setCursorType(CursorType.STATIC);
Recordset recordset = datasetvector.query(parameter);
if (recordset.getRecordCount() < 1) { return; }
Geometry geometry = recordset.getGeometry();
GeoStyle geoStyle = new GeoStyle();
geoStyle.setLineWidth(Double.valueOf(10));
geoStyle.setLineColor(new Color(255, 0, 0));
geoStyle.setFillForeColor(new Color(255, 0, 0));
geometry.setStyle(geoStyle);
geoStyle.dispose();
mapControl.getMap().refresh();