English

How To: Customize layers for translation requests with the DDE translation tool

Summary

Clicking on the Data Delivery Extension (DDE) translation tool engages a script that checks for layers in the table of contents of the viewer that are mapped to a theme in the FMEDownload.htm file. If a layer is not listed in the layerThemes array but is visible in HTML Viewer an error may display.

Instructions provided in this article are to customize the layers displayed for translation so the error can be avoided. Please see the Related Information, below, for more information on the error.

Procedure

Edit the fmeDownload.htm file for your Web site to map all layers and customize the layers available for translation:

  1. Open the file FmeDownload.htm in a text editor. You can find the file in ArcIMS Web site directory for the viewer integrated with DDE. For example, C:\ArcIMS\Website\<mysite>\FME\fmeDownload.htm
  2. Inside the FmeDownload.htm, find the populateLayerList function. In the populateLayerList function find the following line:

    Code:
    var curLayerName = mapFrame.LayerName[iCnt];


    After this line add the following two lines of code so that it looks like this:

    Code:
    var curLayerName = mapFrame.LayerName[iCnt];
    if ( layerThemes[curLayerName] == "no_download" )
    continue;

  3. Inside the FmeDownload.htm, edit the layer to theme mapping definitions at the start of the file so that any layers that should not be available for download has their DDE theme name defined as "no_download". For example:

    Code:
    layerThemes["Art Galleries"] = "no_download";


    In the above example, the layer 'Art Galleries', which is visible in HTML Viewer, will not be shown in the DDE translation layer list.
  4. Save and close the file FMEDownload.htm.

Related Information