Terry's blog

Focus on bigdata and cloud.

博客园 首页 新随笔 联系 订阅 管理

首先导入
using MapInfo.Data;
using MapInfo.Engine;
using MapInfo.Mapping;

 1      private void CreateTempTable()
 2        {
 3            MapInfo.Mapping.Map map = Session.Current.MapFactory[0];
 4            IMapLayer lyr = map.Layers["Animation"];
 5            if (lyr == null)
 6            {
 7                TableInfoMemTable ti = new TableInfoMemTable("Animation");
 8                ti.Columns.Add(ColumnFactory.CreateFeatureGeometryColumn(map.GetDisplayCoordSys()));
 9                ti.Columns.Add(ColumnFactory.CreateStyleColumn());
10                Table table = MapInfo.Engine.Session.Current.Catalog.CreateTable(ti);
11                map.Layers.Insert(0new FeatureLayer(table, "Animation""Animation"));
12            }

13        }
posted on 2007-12-24 09:30  王晓成  阅读(353)  评论(0编辑  收藏  举报