代码大概是这样:
打开地图:
mapControl.getMap().getLayers().add(ds.getDatasets().get(0), true);
mapControl.getMap().getLayers().get(0).setEditable(true);
mapControl.setAction(Action.SELECT);
mapControl.getMap().setScale(1/100000);
mapControl.setMapParamChangedListener(mapParameterChangedListener);
mapControl.addGeometrySelectedListener(this);
mapControl.addGeometryAddedListener(this);
mapControl.getMap().refresh();
查询数据后创建GeoText显示在跟踪层:
Point2D pt = featureSet.getGeometry().getInnerPoint();
TextPart part = new TextPart();
part.setAnchorPoint(pt);
part.setText(mStake);
GeoText text = new GeoText(part);
mTrackingLayer.add(text,"text");
part.dispose();
text.dispose();
为什么点击了对应得GeoText,不能回调
geometrySelected这个方法,求救!!!!!