您好。我想在超图的三维场景(scene)中添加一个点,然后这个点有着他的属性。
但是我用如下代码添加后在三维场景中看不到这点,仅能再这个点附近看到 geotext。
并且我想要点击选中这个点(自动捕捉这个点)的时候弹出一个气泡。现在的情况是刚在三维场景中添加这个点的时候有气泡,关掉了气泡就不能再弹出来了。
大佬们有什么解决的方法吗?
public void AddPointToScence(Point3D p3d)
        {
            GeoPoint3D geoPoint3D = new GeoPoint3D(p3d);
            geoPoint3D.Position = p3d;
            // 添加图标在3维图上
            GeoStyle3D geoStyle3D = new GeoStyle3D();
            geoStyle3D.MarkerFile = Directory.GetCurrentDirectory() +
                "\\icons\\" + "平硐" + ".png";
            //标记大小
            geoStyle3D.MarkerScale = 1.0;
            geoStyle3D.MarkerAnchorPoint = new Point2D(0.5, 0);
            geoStyle3D.AltitudeMode = AltitudeMode.Absolute;
            geoPoint3D.Style3D = geoStyle3D;
            mSceneControl.Scene.TrackingLayer.Add(geoPoint3D, "平硐");//向三维跟踪图层中添加一个对象。
            // 添加文字标签,写在三维图上
            string text = tb_GK_adit_no.Text.ToString();
            TextPart textpart = new TextPart(text, mP3D.X, mP3D.Y, mP3D.Z);
            GeoText geoText = new GeoText(textpart);
            geoText.TextStyle.ForeColor = System.Drawing.Color.Red;
            geoText.TextStyle.BackColor = System.Drawing.Color.AliceBlue;
            geoText.TextStyle.Shadow = true;
            geoText.TextStyle.ShadowColor = System.Drawing.Color.AliceBlue;
            geoText.TextStyle.Bold = true;
            mSceneControl.Scene.TrackingLayer.Add(geoText, text);
         
            // 将气泡控件添加到SceneControl中
            mSceneControl.Controls.Add(bubbleControl);
            Bubble bubble = new Bubble();
            //选择不同的地物弹出不同的气泡
            
            bubble.ClientWidth = bubbleControl.Width;
            bubble.ClientHeight = bubbleControl.Height;
            bubble.Pointer = p3d;
            bubbleControl.Location = new System.Drawing.Point(bubble.ClientLeft, bubble.ClientTop);
            mSceneControl.Bubbles.Add(bubble);
            mSceneControl.Scene.Refresh();
            // 注册气泡初始化的事件
            mSceneControl.BubbleInitialize += new BubbleInitializeEventHandler(m_sceneControl_BubbleInitialize);
            // 注册气泡位置变化的事件
            mSceneControl.BubbleResize += new BubbleResizeEventHandler(m_sceneControl_BubbleResize);
            // 注册关闭气泡的事件
            mSceneControl.BubbleClose += new BubbleCloseEventHandler(m_sceneControl_BubbleClose);
        }

