English

How To: Integrate the Data Delivery functionality with ArcIMS Web sites based on the HTML Viewer

Summary

Instructions provided describe how to customize an existing ArcIMS Web site based on the HTML Viewer to include the Data Delivery Extension functionality.

To use the Data Deliver Extension (DDE), there is several steps involved:

  1. Installing the DDE software.
  2. Configuring DDE with your Web Server.
  3. Integrating DDE with your ArcIMS sites.
Warning:
This article includes instructions for Step C. Integrating DDE with ArcIMS sites only. ArcIMS 9.0 and DDE need to be ready to use and configured before continuing. See the Related Information section for articles regarding Steps A and B.
Verify that the Data Delivery Extension was installed and verified according to the steps to configure DDE with the Web server and Servlet Engine.

Procedure

  1. Add the DDE button to theexisting ArcIMS Web site.
    1. Copy the directory C:\ArcIMS\website\DDE_Sample\FME to the location of the ArcIMS Web site, for example: C:\ArcIMS\Website\<mysite>.
    2. Copy the file C:\ArcIMS\website\DDE_Sample\javascript\fme_export.js to the location of the ArcIMS Website's javascript directory, for example: C:\ArcIMS\Website\<mysite>\javascript.
    3. In a text editor, open the file C:\ArcIMS\Website\<mysite>\ArcIMSparam.js
    4. At the end of the variable declaration section, add the line 'var use FMEExport=true;' (no quotes) so that the code appears similar to the following:
      ...
      var useBuffer=true;
      var useExtract=false;
      var useFMEExport=true;
    5. Save and close the file.
    6. In a text editor, open C:\ArcIMS\Website\<mysite>\javascript\fme_export.js.
    7. Verify the host name shown in the URL is correct or edit it with the name, alias or IP address of the ArcIMS host machine accordingly. Use the host name that is used by clients to access the site.
    8. Replace DDE_Sample with the name of the ArcIMS Web site.
    9. Save and close the file.
      1. In a text editor, open C:\ArcIMS\Website\<mysite>\toolbar.htm. Copy the following text and place it towards the end of the file before the line "if (isSecond) document.write('</tr><tr>');":
        if (parent.MapFrame.useFMEExport) {
        	document.write('<td align="center" valign="middle">');
        	document.write('<img src="/safeViewerHTML/images/SpatialDirectButton.gif" width=16 height=16 hspace=1 vspace=1 border=0 alt="Export Map Using DDE" onmousedown="parent.MapFrame.fmeExport();" onmouseover="window.status=\'Translate and Download Map Using DDE\'">');
        	isSecond = !isSecond;
        	document.writeln('</td>');
        	if (isSecond) document.write('</tr><tr>');
        }
        So that the file appears as follows:
        	if (parent.MapFrame.canLoad) {
        		// Load MapService. . . requires aimsGeneric.js
        		document.write('<td align="center" valign="middle">');
        		document.write('<img src="images/open_1.gif" width=16 height=16 hspace=1 vspace=1 border=0 alt=" ' + t.buttonList[41] + '" onmousedown="parent.MapFrame.loadMapForm();" onmouseover="window.status=\' ' + t.buttonList[41] + '\'">');
        		document.writeln('</td>');
        }
        if (parent.MapFrame.useFMEExport) {
        		document.write('<td align="center" valign="middle">');
        		document.write('<img src="/safeViewerHTML/images/SpatialDirectButton.gif" width=16 height=16 hspace=1 vspace=1 border=0 alt="Export Map Using DDE" onmousedown="parent.MapFrame.fmeExport();" onmouseover="window.status=\'Translate and Download Map Using DDE\'">');
        	isSecond = !isSecond;
        		document.writeln('</td>');
        	if (isSecond) document.write('</tr><tr>');
        }
        	document.writeln('</tr>');
        	document.writeln('</TABLE>');
        
        </SCRIPT>
        Close and save the file.
    10. In a text editor, open C:\ArcIMS\Website\<mysite>\MapFrame.htm and at the end of the block with similar script statements, add the line:
      <SCRIPT TYPE=”text/javascript” LANGUAGE=”JavaScript” SRC=”javascript/fme_export.js”></SCRIPT>
    11. Save and close the file.
  2. Configure DDE for the data source. See the DDE Reference Guide, Chapter 5 for the according steps necessary.
  3. Configure the Web site to allow the translation of the according data.
    1. Using a text editor such as WordPad, open the file <$DDE_HOME>\translationControl\system\Config.csv and verify that the Word Wrap option is disabled.
      Note:
      Define the layers that should be available to the end user. An important aspect is to know how the layer name, as displayed in your ArcIMS site's legend, corresponds to the equivalent layer name as saved in the Config.csv file.
    2. Open C:\ArcIMS\Website\<mysite>\FME\fmeDownload.htm in another text editor.
    3. Find the layerThemes array section and edit it according to this example:

      Assume that the legend of the HTML Viewer has two layers shown as 'Cities' and 'Streets'. These layer names reference the cities.shp and streets.shp file, respectively.

      In the Config.csv file, look for the corresponding DDE theme name to these layers. For example, 'CITIES^SHAPE_DATA' and 'STREETS^SHAPE_DATA'.
    4. In the fmeDownload.htm file, create an entry that references the same layer. For example:
      layerThemes[“Cities”] = CITIES^SHAPE_DATA
      layerThemes[“Streets”] = STREETS^SHAPE_DATA
      Warning:
      These entries are case sensitive!

      Create entries for each layer that should be available for the end user to download.
    5. Edit the Download Format Selection Box near the end of the file to customize the translation formats available to the end user. For the purpose of testing the GIF image output is the default selection. Edit this section according to the provided example code.
    6. Edit the Coordinate System Selection Box to define the available coordinate systems. Add or remove tags as necessary. A list of supported coordinate systems is available at <DDE>\fme\coordsys.db
    7. Edit the Layer Selection Box to define the number of layers to be displayed on the download page.
    8. Save and close the file.
  4. Start DDE. Navigate to Start > Programs > DDE > Start DDE.
  5. Verify that DDE is integrated correctly with the ArcIMS Web site by launching the site in Internet Explorer. Click on the DDE button to download extracted data using a specified format.

Related Information