在对绘制的线面尝试实现标注的功能,通过下列代码给TextPart3D赋值后,要怎么样才能把GeoText3D添加到跟踪图层上,并确定位置啊,因为是新手,不知道要怎么写,有示例可以参考吗
private void measureDistance(Tracking3DEvent tracking3DEvent) {
// 加点
// 更新总距离长度
double totalLength = tracking3DEvent.getTotalLength();
double totalcurrentlength = tracking3DEvent.getCurrentLength();
double x = tracking3DEvent.getX();
Log.v("lzw", "totalLength=" + totalLength + ";" + "totalcurrentlength=" + totalcurrentlength);
Message msg = new Message();
Bundle bundle = new Bundle();
bundle.putDouble("length", totalLength);
msg.setData(bundle);
totalLengthHandler.sendMessage(msg);
TextPart3D textPart3D1 = new TextPart3D();
textPart3D1.setText(String.valueOf(msg.getData().getDouble("length")));
Log.i("测试1", "textPart3D=" + textPart3D1.getText());
GeoText3D geoText3D = new GeoText3D(textPart3D1);
GeoPlacemark geoPlacemark = new GeoPlacemark("3D",geoText3D);
sceneControl.getScene().getTrackingLayer().add(geoPlacemark,"geoText");
}