/// <summary>
 /// 矩形查询回调
 /// </summary>
 private void RectSelect(GraphicsLayer gLayer, IGraphics graphics, List <Point> logPntArr)
 {
     if (logPntArr.Count > 1)
     {
         ZDIMS.BaseLib.Rect rect = new ZDIMS.BaseLib.Rect();
         rect.xmin = Math.Min(logPntArr[0].X, logPntArr[1].X);
         rect.xmax = Math.Max(logPntArr[0].X, logPntArr[1].X);
         rect.ymin = Math.Min(logPntArr[0].Y, logPntArr[1].Y);
         rect.ymax = Math.Max(logPntArr[0].Y, logPntArr[1].Y);
         this.select(rect, SelectionType.SpatialRange);
     }
 }
 private void RectConSelectCallback(GraphicsLayer gLayer, IGraphics graphics, List <Point> logPntArr)
 {
     if (logPntArr.Count > 1)
     {
         ZDIMS.BaseLib.Rect rect = new ZDIMS.BaseLib.Rect();
         rect.xmin = Math.Min(logPntArr[0].X, logPntArr[1].X);
         rect.xmax = Math.Max(logPntArr[0].X, logPntArr[1].X);
         rect.ymin = Math.Min(logPntArr[0].Y, logPntArr[1].Y);
         rect.ymax = Math.Max(logPntArr[0].Y, logPntArr[1].Y);
         m_conditionInput.SelectionType = SelectionType.Both;
         m_conditionInput.QueryGeoObj   = rect;
         m_conditionInput.Show();
     }
 }
Пример #3
0
 private void iMSMap1_MapReady(IMSMapEvent e)
 {
     if (!DesignerProperties.IsInDesignTool)
     {
         if (g_GraphicsLayer == null)
         {
             g_GraphicsLayer = new GraphicsLayer();
             this.iMSMap1.AddChild(this.g_GraphicsLayer);
             g_GraphicsLayer.EnableGPUMode = true;
         }
         if (g_GraphicsLayer != null)
         {
             //添加第一个矩形范围
             IMSRect = new IMSRectangle(CoordinateType.Logic);
             this.g_GraphicsLayer.AddGraphics(IMSRect);
             //起始点
             IMSRect.StartPoint = new Point(114.30829449926757, 30.637357284423828);
             //结束点
             IMSRect.EndPoint = new Point(114.32125563671875, 30.64560111743164);
             IMSRect.Draw();
             //添加第二个矩形范围
             IMSRect2 = new IMSRectangle(CoordinateType.Logic);
             this.g_GraphicsLayer.AddGraphics(IMSRect2);
             //起始点
             IMSRect2.StartPoint = new Point(114.3189198840332, 30.63515892895508);
             //结束点
             IMSRect2.EndPoint = new Point(114.32991166137695, 30.64738728125);
             IMSRect2.Draw();
             //Rect对象存储第一个矩形的范围
             rect1      = new ZDIMS.BaseLib.Rect();
             rect1.xmin = 114.30829449926757;
             rect1.xmax = 114.32125563671875;
             rect1.ymin = 30.637357284423828;
             rect1.ymax = 30.64560111743164;
             //Rect对象存储第二个矩形范围
             rect2      = new ZDIMS.BaseLib.Rect();
             rect2.xmin = 114.3189198840332;
             rect2.xmax = 114.32991166137695;
             rect2.ymin = 30.63515892895508;
             rect2.ymax = 30.64738728125;
             this.iMSCatalog1.MapContainer = iMSMap1;
         }
     }
 }
Пример #4
0
 private void RectConSelectCallback(GraphicsLayer gLayer, IGraphics graphics, List <Point> logPntArr)
 {
     if (logPntArr.Count > 1)
     {
         ZDIMS.BaseLib.Rect rect = new ZDIMS.BaseLib.Rect();
         rect.xmin = Math.Min(logPntArr[0].X, logPntArr[1].X);
         rect.xmax = Math.Max(logPntArr[0].X, logPntArr[1].X);
         rect.ymin = Math.Min(logPntArr[0].Y, logPntArr[1].Y);
         rect.ymax = Math.Max(logPntArr[0].Y, logPntArr[1].Y);
         if (m_catalog.ActiveMapDoc != null && m_catalog.ActiveMapDoc.Display)
         {
             m_mapDocConditionInput.SelectionType = SelectionType.Both;
             m_mapDocConditionInput.QueryGeoObj   = rect;
             m_mapDocConditionInput.Show();
         }
         if (m_catalog.ActiveLayerObj != null && m_catalog.ActiveLayerObj.Display)
         {
             m_layerConditionInput.SelectionType = SelectionType.Both;
             m_layerConditionInput.QueryGeoObj   = rect;
             m_layerConditionInput.Show();
         }
     }
 }