b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

mapxtreme_mapxtreme编程_mapxtreme 售价

电脑杂谈  发布时间:2017-02-20 21:00:58  来源:网络整理

mapxtreme 售价_mapxtreme编程_mapxtreme

1、简单专题图的显示 MapControl1.Map.Clear(); MapGeosetLoader gl=new MapGeosetLoader(@"F:/test.gst"); MapControl1.Map.Load(gl);//打开地图 MapControl1.Map.Load(new MapTableLoader(@"F:/test.tab"));//打开test.tab地图文件 FeatureLayer lyrPnt=MapControl1.Map.Layers["test"] as FeatureLayer; RangedTheme thm = new RangedTheme(lyrPnt,"PH__1999","ph",3,DistributionMethod.EqualCountPerRange); lyrPnt.Modifiers.Insert(0,thm);//定义一个RangedTheme ThemeLegendFrame frame = LegendFrameFactory.CreateThemeLegendFrame("PH__1999","pp",thm); Legend legend = MapControl1.Map.Legends.CreateLegend(new Size(5,5)); legend.Frames.Append(frame);//定义一个Legend //MapControl1.Map.Adornments.Append(legend);//如果保留此句,MapControl1中将显示Legend LegendControl1.Map = MapControl1.Map; if (MapControl1.Map.Legends.Count > 0) { LegendControl1.Legend = MapControl1.Map.Legends[0]; }//在LegendControl1控件中显示Legend

2、从MapX到MapXtreme2004[1]-工具选择在Mapx中为控件选择工具比较迅速,也很直观,如下: Map1.CurrentTool = miZoomInTool miZoomInTool是个枚举量,指定给CurrentTool属性即可,而且象在VB中,直接在等号之后就把备选项就列出来了,非常容易。 在MapXtreme中,这个不起眼的问题却搞得有点麻烦,主要是架构有点变化,设置位置很容易找 MapControl1.MapTools.CurrentTool= 可是,要赋的值却比较麻烦,因为C#中并没有给出智能提示,而且在帮助和对象浏览器中也没有找到什么枚举值。帮助中说要赋String类型,试着 MapControl1.MapTools.CurrentTool="ZoomInMapTool"; 但是出错。于是查找帮助,了解MapXtreme中的架构,大致如此:MapTools属于MapControl控件的工具集合,其中已经包含了10个工具,debug中挨个求出如下: 0:ZoomInMapTool 1:ZoomOutMapTool 2:PanMapTool 3:CenterMapTool 4:PointSelectionMapTool 5:RadiusSelectionMapTool 6:RectangleSelectionMapTool 7:PolygonSelectionMapTool 8:DistanceMapTool 9:InfoMapTool 但是要选择工具,却不能用Index,也不能用某项的名字字符串,必须用toolname属性,而且必须这样 MapControl1.MapTools.CurrentTool =ZoomInMapTool.Toolname; 因为Toolname是一个静态属性,所以必须用类名来引用,其他别的方式都不行。 看来,以后要用哪个工具,得先查到工具名称,然后才能指定了。


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/tongxinshuyu/article-33547-1.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...