在mapxtreme中 在一个文本框输入一个地名 怎样在mapcontrol控件中显示了

        /// <summary>
        /// 根据输入条件进行查询,并将查询到的结果高亮显示,属性信息显示出来
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            SearchInfo si = MapInfo.Data.SearchInfoFactory.SearchWhere("省会 like '%" + this.textBox1.Text + "%'");
            IResultSetFeatureCollection ifs = MapInfo.Engine.Session.Current.Catalog.Search("省级行政中心", si);

            if (ifs.Count <= 0)
            {
                return;
            }

            //缩放到选择图元范围
            //this.mapControl1.Map.SetView(ifs.Envelope);
            //this.mapControl1.Map.Scale = this.mapControl1.Map.Scale * 2;

            //高亮显示
            MapInfo.Engine.Session.Current.Selections.DefaultSelection.Clear();
            MapInfo.Engine.Session.Current.Selections.DefaultSelection.Add(ifs);
           

            //for (int i = 0; i < ; i++)
            //{
               
            //}

            //if (MapInfo.Engine.Session.Current.Catalog.Count > 0)
            //{
            //    this.textBox1.Text = MapInfo.Engine.Session.Current.Catalog.;
            //}
            //Table _table;
            //_table = MapInfo.Engine.Session.Current.Catalog.OpenTable("F:\\项目资料\\GPS研究\\地图下载\\河北省电子地图Tab格式\\系统所用地图\\省级行政中心.TAB");

            //MessageBox.Show(_table.TableInfo.Columns[0].);
        }

你可能感兴趣的:(F#)