C#MapX添加图元
来源:互联网 发布:淘宝知己知彼多少钱 编辑:程序博客网 时间:2024/05/29 04:34
MapXLib.Point pnt = new MapXLib.Point();
MapXLib.Style newStyle = new MapXLib.Style();
lyr = axMap1.Layers.Item("¹Ç¸É¾ÖÕ¾");
//MapXLib.FeatureFactory feafac = axMap1.FeatureFactory;
ft = axMap1.FeatureFactory ;
newStyle.SymbolType = 1;//MapXLib.SymbolTypeConstants.miSymbolTypeBitmap;
newStyle.SymbolBitmapSize = 20;
newStyle.SymbolBitmapTransparent = true;
newStyle.SymbolBitmapName = "1_r1_c3.BMP";
axMap1.AutoRedraw = false;
lyr.Editable = true;
pnt.Set(e.x1, e.y1);
MapXLib.Feature ftr = ft.CreateSymbol(pnt, newStyle);
lyr.AddFeature(ftr, new MapXLib.RowValues());
lyr.Refresh();
//pnt = null;
//feafac = null;
//lyr = null;
//ftr = null;
//all this draw text. this is rithgt .
MapXLib.Feature ftr1 = new MapXLib.FeatureClass();
MapXLib.Point p = new MapXLib.PointClass();
//p.Set(axMap1.CenterX, axMap1.CenterY);
//pt.Set(pnt.X + 5.0, pnt.Y + 5.0);
ftr1 = axMap1.Layers.Item("骨干局站").AddFeature(axMap1.FeatureFactory.CreateText
(pt, " New Feature", MapXLib.PositionConstants.miPositionCC,
new MapXLib.StyleClass()),
new MapXLib.RowValuesClass());
ft = axMap1.FeatureFactory.IntersectFeatures(ftr, ftr1);
//though here is component two icon into one ,but need add Feature.
axMap1.Layers.Item("骨干局站").AddFeature(ft,new MapXLib.RowValuesClass());
axMap1.AutoRedraw = true;
lyr.Editable = false;
MapXLib.Style newStyle = new MapXLib.Style();
lyr = axMap1.Layers.Item("¹Ç¸É¾ÖÕ¾");
//MapXLib.FeatureFactory feafac = axMap1.FeatureFactory;
ft = axMap1.FeatureFactory ;
newStyle.SymbolType = 1;//MapXLib.SymbolTypeConstants.miSymbolTypeBitmap;
newStyle.SymbolBitmapSize = 20;
newStyle.SymbolBitmapTransparent = true;
newStyle.SymbolBitmapName = "1_r1_c3.BMP";
axMap1.AutoRedraw = false;
lyr.Editable = true;
pnt.Set(e.x1, e.y1);
MapXLib.Feature ftr = ft.CreateSymbol(pnt, newStyle);
lyr.AddFeature(ftr, new MapXLib.RowValues());
lyr.Refresh();
//pnt = null;
//feafac = null;
//lyr = null;
//ftr = null;
//all this draw text. this is rithgt .
MapXLib.Feature ftr1 = new MapXLib.FeatureClass();
MapXLib.Point p = new MapXLib.PointClass();
//p.Set(axMap1.CenterX, axMap1.CenterY);
//pt.Set(pnt.X + 5.0, pnt.Y + 5.0);
ftr1 = axMap1.Layers.Item("骨干局站").AddFeature(axMap1.FeatureFactory.CreateText
(pt, " New Feature", MapXLib.PositionConstants.miPositionCC,
new MapXLib.StyleClass()),
new MapXLib.RowValuesClass());
ft = axMap1.FeatureFactory.IntersectFeatures(ftr, ftr1);
//though here is component two icon into one ,but need add Feature.
axMap1.Layers.Item("骨干局站").AddFeature(ft,new MapXLib.RowValuesClass());
axMap1.AutoRedraw = true;
lyr.Editable = false;
- C#MapX添加图元
- C#+MAPX 添加线、文本、符号等图元
- mapx 删除所有图元
- MapX VC++ 添加图层
- mapx 显示新建图元的属性
- VB + MapX 查找最近的图元
- mapx+vb图元基本操作
- mapx 添加新的永久图层
- mapx 添加新的永久图层
- Mapx 创建新符号图元另外一种方法
- MAPX中修改图元的属性值
- MapX搜索图元与数据绑定总结
- VC中mapx图元颜色的改变
- 查找图元方法中遇见的MapX的Bug
- MapX使用数据库数据添加专题图(系列之三)
- MapX使用数据库数据添加专题图(系列之三)
- MapX使用数据库数据添加专题图(系列之三)
- MapX编程详解(C++)----MapX发布技术
- mysql 4.1.22 common command 常用命令
- IT管理人才必备的十大能力
- 第四届中文网志年会参会感想
- 一篇学习JAVA好文,写得比较幽默。
- 读写ini文件的类(转)
- C#MapX添加图元
- pb中的进制转换
- mysql 主从 Last_Errno: 1146错误
- 三四十年代中国的写真转帖
- 合格java程序员学习过程
- java常见错误以及可能原因集锦
- 网络营销教程—SEO 第三章 搜索引擎营销
- PowerDesigner随笔
- 从HWnd得到IWebbrowser2接口