sceneControl.setOnTouchListener(new View.OnTouchListener() {
@SuppressLint("ClickableViewAccessibility")
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
Log.i("motionEventX",(int)motionEvent.getX()+"");
Log.i("motionEventY",(int)motionEvent.getY()+"");
android.graphics.Point point=new android.graphics.Point((int)motionEvent.getX(),(int)motionEvent.getY());
Point3D point3D = sceneControl.getScene().pixelToGlobe(point);
Log.i("motionEvent",point3D.toString());
GeoPoint3D geoPoint3D=new GeoPoint3D(point3D.getX(),point3D.getY(),point3D.getZ());
GeoStyle3D geoStyle3D=new GeoStyle3D();
geoStyle3D.setFillForeColor(new com.supermap.data.Color(244, 50, 50));
geoStyle3D.setMarkerColor(new com.supermap.data.Color(244, 50, 50));
geoPoint3D.setStyle3D(geoStyle3D);
//sceneControl.getScene().getTrackingLayer().clear();
TrackingLayer3D trackingLayer3D = sceneControl.getScene().getTrackingLayer();
trackingLayer3D.add(geoPoint3D, "mytrackingLayer3D");
我在AR管线的场景中,通过touch事件获取坐标,在跟踪图层上加点,但是加的点跟点击的位置不相符合,怎么办?