mapinfo开发 >> MapXtreme创建临时图层

最后编辑时间:2021年07月19日 17:01:40

【内容简介】关于MapXtreme创建临时图层,这里详细分析一下。

        public void CreatTmpTable()
        {
            TableInfoMemTable tblInfoTemp = new TableInfoMemTable(tmpTableName);   //MapXtreme创建临时图层
            if (tblTemp != null) //Table exists close it
            {
                Cat.CloseTable(tmpTableName);
            }
            tblInfoTemp.Columns.Add(ColumnFactory.CreateFeatureGeometryColumn(map.GetDisplayCoordSys()));
            tblInfoTemp.Columns.Add(ColumnFactory.CreateStyleColumn());
            tblInfoTemp.Columns.Add(ColumnFactory.CreateStringColumn("Name", 40)); // MapXtreme临时图层名称
            tblInfoTemp.Columns.Add(ColumnFactory.CreateStringColumn("Dept", 15));  // MapXtreme临时图层其他属性
            tblInfoTemp.Columns.Add(ColumnFactory.CreateIntColumn("Level"));  // MapXtreme临时图层其他属性
            tblTemp = Cat.CreateTable(tblInfoTemp);
            FeatureLayer lyr = new FeatureLayer(tblTemp);
            map.Layers.Add(lyr);
        }

分享到: 豆瓣 新浪微博 百度贴吧 QQ空间 QQ好友
复制链接分享给好友或者自己收藏!这里会及时更新中。。。

相关推荐:
 
QQ
QQ:278325424
咨询热线
18191066384