使用产品:iMobile v1010 for android
问题:我已经实现态势标绘上图的功能,但我想选中某个图标后编辑它的风格,比如颜色,我通过以下代码尝试设置,但没有起作用,不知道正确的做法应该是怎样的?
assert control != null;
Geometry geometry = control.getCurrentGeometry();
UtilsKt.d(TAG, "当前绘制的Geometry=", geometry);
if (geometry instanceof GeoGraphicObject) {
GeoGraphicObject object = (GeoGraphicObject) geometry;
GeoStyle style = new GeoStyle();
com.supermap.data.Color color = new com.supermap.data.Color(45, 93, 236);
style.setFillBackColor(color);
style.setFillForeColor(color);
object.setStyle(style);
}
control.submit();
control.setAction(Action.SELECT);
control.getMap().refresh();