/// <summary> /// 闪烁图形 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FlashFeature(object sender, UploadStringCompletedEventArgs e) { try { m_featureGeo = activeLayer.OnGetGeomByFID(e); } catch (Exception ex) { MessageBox.Show("获取该要素空间信息失败!" + ex.Message); return; } bool flg = false; if (m_featureGeo.LinGeom != null && m_featureGeo.LinGeom.Length > 0) { List <Point> pntArr = new List <Point>(); for (int i = 0; i < m_featureGeo.LinGeom.Length; i++) { for (int j = 0; j < m_featureGeo.LinGeom[i].Line.Arcs.Length; j++) { for (int k = 0; k < m_featureGeo.LinGeom[i].Line.Arcs[j].Dots.Length; k++) { pntArr.Add(new Point(m_featureGeo.LinGeom[i].Line.Arcs[j].Dots[k].x, m_featureGeo.LinGeom[i].Line.Arcs[j].Dots[k].y)); } } } if (pntArr[0].X <activeLayer.MapContainer.WinViewBound.XMin || pntArr[0].X> activeLayer.MapContainer.WinViewBound.XMax || pntArr[0].Y <activeLayer.MapContainer.WinViewBound.YMin || pntArr[0].Y> activeLayer.MapContainer.WinViewBound.YMax) { activeLayer.MapContainer.PanTo(pntArr[0].X, pntArr[0].Y); } m_graphics = new IMSPolyline(CoordinateType.Logic) { Points = pntArr, StrokeThickness = 4 }; flg = true; } if (m_featureGeo.PntGeom != null && m_featureGeo.PntGeom.Length > 0) { if (m_featureGeo.PntGeom[0].Dot.x <activeLayer.MapContainer.WinViewBound.XMin || m_featureGeo.PntGeom[0].Dot.x> activeLayer.MapContainer.WinViewBound.XMax || m_featureGeo.PntGeom[0].Dot.y <activeLayer.MapContainer.WinViewBound.YMin || m_featureGeo.PntGeom[0].Dot.y> activeLayer.MapContainer.WinViewBound.YMax) { activeLayer.MapContainer.PanTo(m_featureGeo.PntGeom[0].Dot.x, m_featureGeo.PntGeom[0].Dot.y); } m_graphics = new IMSCircle(CoordinateType.Logic) { CenX = m_featureGeo.PntGeom[0].Dot.x, CenY = m_featureGeo.PntGeom[0].Dot.y, RadiusEx = 6 }; flg = true; } if (m_featureGeo.RegGeom != null && m_featureGeo.RegGeom.Length > 0) { List <Point> pntArr = new List <Point>(); for (int i = 0; i < m_featureGeo.RegGeom[0].Rings.Length; i++) { for (int j = 0; j < m_featureGeo.RegGeom[0].Rings[i].Arcs.Length; j++) { for (int k = 0; k < m_featureGeo.RegGeom[0].Rings[i].Arcs[j].Dots.Length; k++) { pntArr.Add(new Point(m_featureGeo.RegGeom[0].Rings[i].Arcs[j].Dots[k].x, m_featureGeo.RegGeom[0].Rings[i].Arcs[j].Dots[k].y)); } } } if (pntArr[0].X <activeLayer.MapContainer.WinViewBound.XMin || pntArr[0].X> activeLayer.MapContainer.WinViewBound.XMax || pntArr[0].Y <activeLayer.MapContainer.WinViewBound.YMin || pntArr[0].Y> activeLayer.MapContainer.WinViewBound.YMax) { activeLayer.MapContainer.PanTo(pntArr[0].X, pntArr[0].Y); } for (int n = 0; n < m_featureGeo.RegGeom.Length; n++) { DrawPolygons(m_featureGeo.RegGeom[n]); } } if (flg) { m_graphicsLayer.AddGraphics(m_graphics); m_graphics.FlickerOverCallback = new GraphicsFlickerOverDelegate(FlickerOverCallback); m_graphics.Draw(); m_graphics.Flicker(); } }