<!--StartFragment -->
我在窗体程序的添加设施点和事件点功能不知为什么每次点都会把下面的道路选中,请问有什么解决方法吗?
是在 m_sceneControl_MouseClick里面设置吗?
不好意思我是个新手,条件已经没问题了 ,具体怎么区分呢?
void m_sceneControl_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e) { switch (_addPoints) { case AddPoints.AddNull: m_sceneControl.Action = Action3D.Pan; break; case AddPoints.AddFacilityPoints: if (e.Button == MouseButtons.Left && _addPoints == AddPoints.AddFacilityPoints) { Point3D point3D = m_sceneControl.Scene.PixelToGlobe(e.Location); Point2D point = new Point2D(point3D.X, point3D.Y); GeoPoint3D geoPoint3D = new GeoPoint3D(point3D); GeoStyle3D style3D = new GeoStyle3D(); style3D.MarkerSize = 5; style3D.MarkerColor = Color.DarkGreen; style3D.AltitudeMode = AltitudeMode.RelativeToGround; style3D.BottomAltitude = 1.1; geoPoint3D.Style3D = style3D; //添加设施点的标签 TextPart3D textPart3D = new TextPart3D("设施点", point3D); GeoText3D text3D = new GeoText3D(textPart3D); TextStyle textStyle = new TextStyle(); textStyle.ForeColor = Color.GreenYellow; textStyle.FontName = "等线"; text3D.TextStyle = textStyle; points.Add(point); m_sceneControl.Scene.TrackingLayer.Add(geoPoint3D, "设施点"); m_sceneControl.Scene.TrackingLayer.Add(text3D, "设施点文本"); m_sceneControl.Scene.Refresh(); } else { m_sceneControl.Action = Action3D.Pan; m_sceneControl.Scene.Refresh(); } break; } } }