目的:
1.arcgis server9.2 ADF的AddGraphics-FeatureGraphicLayer

准备工作:
1.(三、一)的工程,具体见前篇。

开始: 
1.在页面上在新增一个Toolbar2,在ToolbarItems中添加一个Tool然后设置相应的属性,具体如下:

1ArcGIS.Server.9.2.DotNet自带例子分析(三、二)<ToolbarItems>
2ArcGIS.Server.9.2.DotNet自带例子分析(三、二)<esri:Tool ClientAction="Point" JavaScriptFile="" Name="AddFeature" ServerActionAssembly="AddGraphics" ServerActionClass="AddGraphics.FeatureGraphicTool"Text="Add Feature Point" />
3ArcGIS.Server.9.2.DotNet自带例子分析(三、二)</ToolbarItems>

2.在GraphicPointTools.cs中新增加FeatureGraphicTool类来实现上面的Tool的功能,具体代码和说明如下:

  1ArcGIS.Server.9.2.DotNet自带例子分析(三、二)public class FeatureGraphicTool : IMapServerToolAction
  2    }
3.在Toolbar2的ToolbarItems中在添加一个DropDownBox然后设置相应的属性,具体如下:

1ArcGIS.Server.9.2.DotNet自带例子分析(三、二)<esri:DropDownBox ClientAction="" DropDownListWidth="100" Items="&lt;Items&gt;&lt;ListItem Text=&quot;Red_Blue&quot; Value=&quot;Red_Blue&quot; Selected=&quot;True&quot; /&gt;&lt;ListItem Text=&quot;Yellow_Green&quot; Value=&quot;Yellow_Green&quot; Selected=&quot;False&quot; /&gt;&lt;ListItem Text=&quot;Orange_Purple&quot; Value=&quot;Orange_Purple&quot; Selected=&quot;False&quot; /&gt;&lt;/Items&gt;"
2ArcGIS.Server.9.2.DotNet自带例子分析(三、二)                          JavaScriptFile="" Label="Colors:" LabelWidth="100" Name="DropDownBoxColor" SelectedIndex="0"
3ArcGIS.Server.9.2.DotNet自带例子分析(三、二)                          ServerActionAssembly="AddGraphics" ServerActionClass="AddGraphics.FeatureDropDownColor" />

4.在GraphicPointTools.cs中新增加FeatureDropDownColor类来实现上面的DropDownBox的功能,具体代码和说明如下:

 1ArcGIS.Server.9.2.DotNet自带例子分析(三、二)public class FeatureDropDownColor : IMapServerDropDownBoxAction
 2    }

5.这样就完成了添加上的点的颜色变更的功能,然后在Toolbar2的ToolbarItems中在添加一个DropDownBox然后设置相应的属性用来实现变换添加点的显示形状的功能,具体如下:

1ArcGIS.Server.9.2.DotNet自带例子分析(三、二)<esri:DropDownBox ClientAction="" DropDownListWidth="100" Items="&lt;Items&gt;&lt;ListItem Text=&quot;Circle&quot; Value=&quot;Circle&quot; Selected=&quot;True&quot; /&gt;&lt;ListItem Text=&quot;Square&quot; Value=&quot;Square&quot; Selected=&quot;False&quot; /&gt;&lt;ListItem Text=&quot;Star&quot; Value=&quot;Star&quot; Selected=&quot;False&quot; /&gt;&lt;/Items&gt;"
2ArcGIS.Server.9.2.DotNet自带例子分析(三、二)                          JavaScriptFile="" Label="Type:" LabelWidth="100" Name="DropDownBoxSymbol" SelectedIndex="0"
3ArcGIS.Server.9.2.DotNet自带例子分析(三、二)                          ServerActionAssembly="AddGraphics" ServerActionClass="AddGraphics.FeatureDropDownSymbol" />
6.在GraphicPointTools.cs中新增加FeatureDropDownSymbol类来实现上面的DropDownBoxSymbol的功能,具体代码和说明如下:
 1ArcGIS.Server.9.2.DotNet自带例子分析(三、二)public class FeatureDropDownSymbol : IMapServerDropDownBoxAction
 2    }
7.这样就完成了添加点的形状变换的功能了。本例子到这里也分析结束了,关于其中的MapTips 的功能好像有问题了这里就暂时不讲了。
ArcGIS.Server.9.2.DotNet自带例子分析(三、二)

相关文章: