当前位置: 代码迷 >> GIS >> c# 地图x5.0 鹰眼
  详细解决方案

c# 地图x5.0 鹰眼

热度:147   发布时间:2016-05-05 06:24:28.0
c# mapx5.0 鹰眼
           
各位帮我看下为什么以下代码不行。
我想在axMap1中放大后,axMap2中的框能变小,但是现在做出来的axMap2的框不变

 private void axMap1_MapViewChanged(object sender, EventArgs e)
        {
            MapXLib.Feature tempFea;    //声明一个图元,用于鹰眼图中创建的矩形框
            MapXLib.Points tempPoints = new Points();
            MapXLib.Style tempStyle = new Style();
            MapXLib.Point ptMap_1 = new MapXLib.Point();
            MapXLib.Point ptMap_2 = new MapXLib.Point();
            MapXLib.Point ptMap_3 = new MapXLib.Point();
            MapXLib.Point ptMap_4 = new MapXLib.Point();
            MapXLib.Layer m_layer_Eagle;
            MapXLib.Feature m_feature_Eagle;

            //设置矩形框四角坐标为主图边框
            ptMap_1.Set(axMap1.CtlBounds.XMin, axMap1.CtlBounds.YMin);
            ptMap_2.Set(axMap1.CtlBounds.XMax, axMap1.CtlBounds.YMin);
            ptMap_3.Set(axMap1.CtlBounds.XMax, axMap1.CtlBounds.YMax);
            ptMap_4.Set(axMap1.CtlBounds.XMin, axMap1.CtlBounds.YMax);
            //添加点到点集
            tempPoints.Add(ptMap_1, 1);
            tempPoints.Add(ptMap_2, 2);
            tempPoints.Add(ptMap_3, 3);
            tempPoints.Add(ptMap_4, 4);

            //以下设置边框样式
            tempStyle.RegionPattern = FillPatternConstants.miPatternNoFill;
            tempStyle.RegionBorderColor = (uint)MapXLib.ColorConstants.miColorBlue;
            tempStyle.RegionBorderWidth = 2;
            //////////////以下创建临时图层/////////////////////////  
            MapXLib.LayerInfo tempLayerInfo = new MapXLib.LayerInfoClass();
            MapXLib.Fields flds = new MapXLib.FieldsClass();
            flds.AddStringField("Name", 100, false);
            tempLayerInfo.Type = MapXLib.LayerInfoTypeConstants.miLayerInfoTypeTemp;
            tempLayerInfo.AddParameter("Name", "Eagle");
  相关解决方案