//Makethetablemappable
ti.Columns.Add(MapInfo.Data.ColumnFactory.CreateFeatureGeometryColumn(myMap.GetDisplayCoordSys()));
ti.Columns.Add(MapInfo.Data.ColumnFactory.CreateStyleColumn());
MapInfo.Data.Tabletable=MapInfo.Engine.Session.Current.Catalog.CreateTable(ti);
//CreateanewFeatureLayerbasedonthetemptable,sowecanseethetemptableonthemap.
myMap.Layers.Insert(0,newFeatureLayer(table,"templayer","TempLayerAlias"));
IMapLayerlyr=myMap.Layers["TempLayerAlias"];
if(lyr==null)return;
FeatureLayerfLyr=lyrasFeatureLayer;
MapInfo.Geometry.DPointpoint=newDPoint(100,20);
MapInfo.Geometry.PointgeoPoint=newMapInfo.Geometry.Point(myMap.GetDisplayCoordSys(),point);
//创建内置MapInfo符号图标
SimpleVectorPointStylevStyle=newSimpleVectorPointStyle();
vStyle.Code=67;
vStyle.Color=Color.Red;
vStyle.PointSize=Convert.ToInt16(48);
vStyle.Attributes=StyleAttributes.PointAttributes.BaseAll;
vStyle.SetApplyAll();
//CreateaFeaturewhichcontainsaPointgeometryandinsertitintotemptable.
Featurefeature=newFeature(geoPoint,vStyle);
MapInfo.Data.Keykey=fLyr.Table.InsertFeature(feature);

//创建自定义位图样式
//位图相对于位置C:\ProgramFiles\CommonFiles\MapInfo\MapXtreme\6.8.0\CustSymb
stringfileName=@"AMBU1-32.BMP";
BitmapPointStylebStyle=newBitmapPointStyle(fileName);
bStyle.PointSize=Convert.ToInt16(24);
bStyle.NativeSize=true;
bStyle.Attributes=StyleAttributes.PointAttributes.BaseAll;
bStyle.SetApplyAll();
point=newDPoint(140,55);
geoPoint=newMapInfo.Geometry.Point(myMap.GetDisplayCoordSys(),point);
feature=newFeature(geoPoint,bStyle);
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/tongxinshuyu/article-36540-3.html
我5s升了9
美国是德国的总督