예제 #1
0
        private void miAccessDataToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //获取保存有亚洲城市名的属性表,将其作为构造函数的参数
            //新建DataBook对象
            DataOperator dataOperator = new DataOperator(axMapControl1.Map);
            DataBook     dataBook     = new DataBook("亚洲城市人口",
                                                     dataOperator.GetCitiesName("World Cities", "Continents", esriSpatialRelationEnum.esriSpatialRelationIntersection));
            //在地图中显示选中的要素
            IActiveView activeview = axMapControl1.ActiveView;

            activeview.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, 0, axMapControl1.Extent);

            //展示DataBook对象
            dataBook.Show();
        }
예제 #2
0
        private void myBuffer_Click(object sender, EventArgs e)
        {
            DataOperator dataOperator = new DataOperator(axMapControl1.Map);
            //dataOperator.Buffer("World Cities","CITY_NAME='Istanbul'",1,axMapControl1.Map);
            int  col;
            Form form2 = new BufferAnalysis();

            //form2.Show();
            if (form2.ShowDialog() == DialogResult.OK)
            {
                string str = form2.Controls["textBox1"].Text;
                col = int.Parse(str);
                DataBook databook = new DataBook("Istanbul's Cities", dataOperator.Buffer("World Cities", "CITY_NAME='Istanbul'", col, axMapControl1.Map));
                //在地图中显示选中的要素
                IActiveView activeview = axMapControl1.ActiveView;
                activeview.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, 0, axMapControl1.Extent);
                databook.Show();
            }
        }