ArcIMS BlueViewer


Purpose
This sample demonstrates basic map and legend display using the ArcIMS application programming interface (API) to send and receive raw ArcXML to an ArcIMS service. Web Application Developer Framework (ADF) controls and the Common API are not used.

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
  1. 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.
  2. 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.
  3. In Windows Explorer, navigate to <ArcGIS install location>\DeveloperKit10.0\Samples\ServerNet\ArcIMS_BlueViewer. This folder contains the sample's CSharp and VBNet folders.
  4. 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.
  5. Open the IIS Manager from Control Panel > Administrative Tools > Internet Information Services (IIS) Manager or Internet Information Services.
  6. 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.
  7. Click the Directory tab, click the Create button in the Application Settings section, then click OK to close the Properties dialog box.
  8. 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>.
  9. In Solution Explorer, right-click Default.aspx and select Set As Start Page.
  10. 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.
  11. Save the project.
  12. Click the Debug drop-down menu and click Start Debugging.

Set up the image service
  1. Open BlueViewer.axl in a text editor.
  2. 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.
  3. Repeat the previous step so the IMAGEWORKSPACE directory points to the same directory.
  4. Save the configuration file.
  5. In ArcIMS Administrator, start an image service named BlueViewer.

At run time
  1. Browse to the viewer uniform resource locator (URL) (for example, http://localhost/ArcIMS_BlueViewer_VBNet) or start the Web application in Visual Studio.
  2. 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.
Download the C# files
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 VB.NET files

Download the files for all languages