How to use
Data has been provided for your use with this sample. It can be found at
<Your ArcGIS Developer Kit Install directory>/Samples/data/NorthAmerica.
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.
- Create an image service. This sample requires the BlueViewer image map service running on an ArcIMS server. The BlueViewer.axl file is located in the sample data location, under the axl directory. See the Set up the image service section below for complete steps.
- In Windows Explorer, navigate to <ArcGIS install location>\DeveloperKit10.0\Samples\ServerNet\ArcIMS_BlueViewer. This folder contains the sample's CSharp and VBNet folders.
- Open the folder of the language you're going to use—CSharp or VBNet—and copy the ArcIMS_BlueViewer_<language> folder to c:\inetpub\wwwroot. The <language> variable can 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, right-click the ArcIMS_BlueViewer_<language> folder, and click Properties. The Properties dialog box opens.
- Click the Directory tab, click the Create button in the Application Settings section, then click OK to close the Properties dialog box.
- Start Microsoft Visual Studio 2008 or 2010 and open the ArcIMS_BlueViewer_<language><vs_version> solution (for example, ArcIMS_BlueViewer_CSharp2008.sln) located in c:\inetpub\wwwroot\ArcIMS_BlueViewer_<language>.
- In Solution Explorer, right-click Default.aspx and select Set As Start Page.
- Open the Web.config file and navigate to the appSettings section to change the settings for the ArcIMS server, service, and port, as well as the default extent when the application starts. The print dialog title can also be changed.
- Save the project.
- Click the Debug drop-down menu and click Start Debugging.
Set up the image service
- Open BlueViewer.axl in a text editor.
- Change the SHAPEWORKSPACE directory to <ArcGIS install location>\DeveloperKit10.0\Samples\data\NorthAmerica. If you moved the sample data to another directory, change the workspace accordingly.
- Repeat the previous step so the IMAGEWORKSPACE directory points to the same directory.
- Save the configuration file.
- In ArcIMS Administrator, start an image service named BlueViewer.
At run time
- Browse to the viewer uniform resource locator (URL) (for example, http://localhost/ArcIMS_BlueViewer_VBNet) or start the Web application in Visual Studio.
- Zoom in on the map or select any other option on the page. The Zoom In tool is active by default.
Additional information
The viewer has the following functionality:
- Fixed zoom—A zoom bar icon uses preset scale values for each zoom level.
- Dynamic zoom—DHTML is used to zoom in and zoom out to a location.
- Fixed pan—Click North, South, East, and West icons to move the map, and click the map to zoom in and re-center.
- Draw legend—Click the Legend icon to view a legend for the map.
- Large map/small map—View the map in two sizes, large and small, and toggle between the two.
- Print map—Print the map and associated legend, as well as add a title to the map before printing it.
- X,Y coordinate location—As the mouse pointer is moved around the map, the current x,y coordinate is shown.
ArcIMS_BlueViewer_CSharp\default.aspx | Contains the Web user interface to interact with server-side code. Provides the general framework for other objects, such as map and legend. |
ArcIMS_BlueViewer_CSharp\default.aspx.cs | Code behind the .aspx file. References Web ADF libraries and functionality. |
ArcIMS_BlueViewer_CSharp\legend.aspx | Contains the Web user interface to render a legend. |
ArcIMS_BlueViewer_CSharp\legend.aspx.cs | Code behind the .aspx file. Uses the ArcIMS API to generate a legend. |
ArcIMS_BlueViewer_CSharp\MakeMap.aspx | Contains the Web user interface to render a map. |
ArcIMS_BlueViewer_CSharp\MakeMap.aspx.cs | Code behind the .aspx file. Uses the ArcIMS API to generate a map. |
ArcIMS_BlueViewer_CSharp\print.aspx | Contains the Web user interface for a print page. |
ArcIMS_BlueViewer_CSharp\print.aspx.cs | Code behind the .aspx file. Uses the ArcIMS API to generate a map and legend image suitable for printing. |
ArcIMS_BlueViewer_VBNet\default.aspx | Contains the Web user interface to interact with server-side code. Provides the general framework for other objects, such as map and legend. |
ArcIMS_BlueViewer_VBNet\default.aspx.vb | Code behind the .aspx file. References Web ADF libraries and functionality. |
ArcIMS_BlueViewer_VBNet\legend.aspx | Contains the Web user interface to render a legend. |
ArcIMS_BlueViewer_VBNet\legend.aspx.vb | Code behind the .aspx file. Uses the ArcIMS API to generate a legend. |
ArcIMS_BlueViewer_VBNet\MakeMap.aspx | Contains the Web user interface to render a map. |
ArcIMS_BlueViewer_VBNet\MakeMap.aspx.vb | Code behind the .aspx file. Uses the ArcIMS API to generate a map. |
ArcIMS_BlueViewer_VBNet\print.aspx | Contains the Web user interface for a print page. |
ArcIMS_BlueViewer_VBNet\print.aspx.vb | Code behind the .aspx file. Uses the ArcIMS API to generate a map and legend image suitable for printing. |
Download the files for all languages