How to use
If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.
At design time
- Verify that the Web ADF for the .NET Framework is installed and functioning properly. For information on installing and configuring the Web ADF, consult the installation guide.
- In Windows Explorer, navigate to <ArcGIS install location>\DeveloperKit10.0\Samples\ServerNET\ArcGIS_SelectBufferTool. You will see both a CSharp and a VBNet folder.
- In Windows Explorer, open the directory referencing the language of your choice: CSharp or VBNet. Copy the folder, ArcGIS_SelectBufferTool_<language>, to c:\inetpub\wwwroot. The <language> variable may be either CSharp or VBNet.
- Open the IIS Manager from Control Panel > Administrative Tools > Internet Information Services (IIS) Manager or Internet Information Services.
- In the console tree view on the left, navigate to Local Computer > Web Sites > Default Web Site.
- Expand Default Web Site then right-click the ArcGIS_SelectBufferTool_<language> folder and click Properties.
- On the Directory tab, click the Create button in the Application Settings section of this panel. Click OK to dismiss the Properties dialog.
- Launch Microsoft Visual Studio (2008 or 2010). Open the solution for the version of the Visual Studio you are using. The Visual Studio version is appended to the solution file name. For example, the Visual Studio 2008 solution file is ArcGIS_SelectBufferTool_CSharp2008.sln and located in the c:\inetpub\wwwroot\ArcGIS_SelectBufferTool_CSharp folder.
- In the Solution Explorer, right-click Default.aspx and select 'Set As Start Page'.
- Open the Default.aspx page in design view. Open the properties window for the MapResourceManager control. Click the ellipsis next to the ResourceItems property. The ResourceItem Collection Editor dialog should display.
- Add or change the MapResourceItem associated with an ArcGIS Server map service.
- To change the Geometry service url used in the buffer tool, open the CustomTools code file and change the geometryServiceUrl property. By default, the value is "http://tasks.arcgisonline.com/arcgis/services/Geometry/GeometryServer".
- Save the project.
- In Visual Studio, click the "Debug" drop-down menu and choose "Start".
At run time
- Browse to viewer's URL (for example, http://localhost/ArcGIS_SelectBufferTool_CSharp) -or- start the Web application within Visual Studio 2008.
- Select an active layer from the drop down list. Use the Select Tool and drag a rectangle on the map to select features in the active layer. Selected features should be displayed in yellow.
- Clear graphics and optionally select another active layer from the drop down list. Define a buffer distance and units. Note, change the units will convert the buffer distance accordingly. Use the Buffer tool to digitize a polygon on the map. The polygon will be rendered with a solid cyan fill. The buffer around the polygon will be rendered with a red diagonal fill and solid black border. Features in the active layer that intersect the polygon and buffer will be selected and displayed using a yellow fill.
ArcGIS_SelectBufferTool_CSharp\Default.aspx | User interface for the Web application. |
ArcGIS_SelectBufferTool_CSharp\Default.aspx.cs | The code behind the user interface. |
ArcGIS_SelectBufferTool_CSharp\App_Code\CustomTools.cs | Class library containing custom buffer and select tool implementations. |
ArcGIS_SelectBufferTool_CSharp\App_Code\Utility.cs | Basic utility classes. |
ArcGIS_SelectBufferTool_VBNet\Default.aspx | User interface for the Web application. |
ArcGIS_SelectBufferTool_VBNet\Default.aspx.vb | The code behind the user interface. |
ArcGIS_SelectBufferTool_VBNet\App_Code\CustomTools.vb | Class library containing custom buffer and select tool implementations. |
ArcGIS_SelectBufferTool_VBNet\App_Code\Utility.vb | Basic utility classes. |
Download the files for all languages