HOW TO

Update an ArcIMS 3.0 HTML Viewer to work with ArcIMS 3.1

Summary

Instructions provided enable an ArcIMS 3.0 HTML Viewer to work with an ArcIMS 3.1 ImageServer MapService.

Please note that the resulting files are not equivalent to those created in ArcIMS 3.1 Designer. Among other differences, an HTML Viewer converted from ArcIMS 3.0 is not supported in the Netscape 6 browser.

Procedure

All Web site files referenced in the following steps can be opened in a text editor such as WordPad.
  1. Update the ArcIMS 3.0 map configuration(*.axl) file to ArcIMS 3.1 specifications. Assuming that the paths to the data locations are correct, there are two ways to update the file:

    A. If it is a basic AXL file, open and save it in ArcIMS 3.1 Author;

    B. Use the AXL2AXL Converter. Download this utility from the link in Related Information, below.
  2. On the ArcIMS 3.1 computer, create an ImageServer MapService using the updated map configuration file. If this MapService is hosted on a different computer than in ArcIMS 3.0, or if the MapService name is different, make corresponding changes in the ArcIMSparam.js file. The MapService name is case-sensitive.

    Verify that the following two lines reference the host computer and MapService name correctly. In this example, the host computer name is 'machine' and the mapservice name is 'sf':

    Code:
    var imsURL = 'http://machine/servlet/com.esri.esrimap.Esrimap?ServiceName=sf';
    var imsOVURL = 'http://machine/servlet/com.esri.esrimap.Esrimap?ServiceName=sf';

  3. In ArcIMSparam.js, change line 164 to enable the use of the HTML Viewer in Netscape 4.x on Windows 2000.

    Change
    Code:
    if (navigator.appVersion.search("5.0") == -1)

    to
    Code:
    if (parseFloat(navigator.appVersion)<5)

  4. In ArcIMSparam.js, change coordinate parameters to have spaces instead of commas:

    Line 116 should read:
    Code:
    var NorthArrowCoords = "20 30";

    Line 140 should read:
    Code:
    var CopyrightCoords = "4 4";

    This makes the coordinate separator a space, consistent with ArcXML 1.1.

  5. In ArcIMSparam.js, change the angle of the North Arrow.

    Line 117 should read:
    Code:
    var NorthArrowAngle = "0";

  6. The default separator between coordinate x,y pairs has changed in ArcXML 1.1 from a comma (,) to a space ( ). Change either the default separator for requests that pass coordinate pairs, as in Step 6A, OR modify each comma-separator to a space, as in step 6B.

    Warning:
    Do not do both (A) and (B)!


    A. Enable map requests to continue to use a comma as the coords separator, which has changed to a space character by default in ArcXML 1.1. There are two steps:

    1. In line 850 of 'aimsClick.js', and lines 584 and 746 of 'aimsXML.js', change the following; both files are located in the javascript folder.

    Code:
    <ARCXML VERSION="1.0.1">\n<REQUEST>\n<GET_IMAGE>\n<PROPERTIES>

    to
    Code:
    <ARCXML VERSION="1.1">\n<REQUEST>\n<GET_IMAGE>\n<PROPERTIES>\n<ENVIRONMENT><SEPARATORS cs="," ts=","/></ENVIRONMENT>

    2. In line 708 of 'aimsXML.js'...

    Code:
    theString += '<SCALEBAR coord="' + parseInt(iWidth * 0.60) + ',2" outline="' + ScaleBarBackColor + '" ';

    ...add a space before the "2":
    Code:
    theString += '<SCALEBAR coord="' + parseInt(iWidth * 0.60) + ', 2" outline="' + ScaleBarBackColor + '" ';


    B. Alternatively modify the coords separators from commas to spaces.

    Warning:
    Do not do this if you chose to do Step 6A.


    In lines 869 and 876 of 'aimsClick.js', change:

    Code:
    theString += '<OBJECT units="DATABASE">\n<LINE coords="' + clickPointX[0] + "," + clickPointY[0];

    to
    Code:
    theString += '<OBJECT units="DATABASE">\n<LINE coords="' + clickPointX[0] + " " + clickPointY[0];

    In lines 871 and 878 of 'aimsClick.js', change:

    Code:
    theString += "," + clickPointX[i] + "," + clickPointY[i];

    to
    Code:
    theString += ";" + clickPointX[i] + " " + clickPointY[i];

    In line 884 of 'aimsClick.js', change:
    Code:
    theString += '<OBJECT units="DATABASE">\n<POINT coord="' + clickPointX[i] + ',' + clickPointY[i] + '">\n';

    to
    Code:
    theString += '<OBJECT units="DATABASE">\n<POINT coords="' + clickPointX[i] + ' ' + clickPointY[i] + '">\n';

    In line 638 of 'aimsXML.js', change:

    Code:
    theString += '<OBJECT units="DATABASE">\n<POINT coord="' + geocodeX + ',' + geocodeY + '">\n';

    to
    Code:
    theString += '<OBJECT units="DATABASE">\n<POINT coord="' + geocodeX + ' ' + geocodeY + '">\n';

    In line 641 of 'aimsXML.js', change:

    Code:
    theString += '<OBJECT units="DATABASE">\n<TEXT coord="' + geocodeX + ',' + geocodeY + '" label="' + geocodeLabel + '">\n';

    to
    Code:
    theString += '<OBJECT units="DATABASE">\n<TEXT coord="' + geocodeX + ' ' + geocodeY + '" label="' + geocodeLabel + '">\n';

    In lines 658 and 665 of 'aimsXML.js', change:

    Code:
    theString += "," + clickPointX[i] + "," + clickPointY[i];

    to
    Code:
    theString += ";" + clickPointX[i] + " " + clickPointY[i];

    In lines 656 and 663 of 'aimsXML.js', change:

    Code:
    theString += '<OBJECT units="DATABASE">\n<LINE coords="' + clickPointX[0] + "," + clickPointY[0];

    to
    Code:
    theString += '<OBJECT units="DATABASE">\n<LINE coords="' + clickPointX[0] + " " + clickPointY[0];

    In line 671 of 'aimsXML.js', change:

    Code:
    theString += '<OBJECT units="DATABASE">\n<POINT coord="' + clickPointX[i] + ',' + clickPointY[i] + '">\n';

    to
    Code:
    theString += '<OBJECT units="DATABASE">\n<POINT coords="' + clickPointX[i] + ' ' + clickPointY[i] + '">\n';

    In line 708 of 'aimsXML.js', change:

    Code:
    theString += '<SCALEBAR coord="' + parseInt(iWidth * 0.60) + ',2" outline="' + ScaleBarBackColor + '" ';

    to
    Code:
    theString += '<SCALEBAR coords="' + parseInt(iWidth * 0.60) + ' 2" outline="' + ScaleBarBackColor + '" ';

    In line 727 of 'aimsXML.js', change:

    Code:
    theString += '<OBJECT units="PIXEL">\n<TEXT coord="5,' + (iHeight-10) + '" label="' + modeBlurb + '">\n';

    to
    Code:
    theString += '<OBJECT units="PIXEL">\n<TEXT coord="5 ' + (iHeight-10) + '" label="' + modeBlurb + '">\n';

    In line 770 of 'aimsXML.js', change:

    Code:
    theString += '<OBJECT units="DATABASE">\n<POINT coord="' + midX + ',' + midY + '">\n';

    to
    Code:
    theString += '<OBJECT units="DATABASE">\n<POINT coord="' + midX + ' ' + midY + '">\n';

    In lines 773 and 774 of 'aimsXML.js', change:

    Code:
    theString += '<OBJECT units="DATABASE">\n<LINE coords="' + left + ',' + bottom + ',' + left + ',' + top + ',';
    theString += right + ',' + top + ',' + right + ',' + bottom + ',' + left + ',' + bottom + '">\n';

    to
    Code:
    theString += '<OBJECT units="DATABASE">\n<LINE coords="' + left + ' ' + bottom + ';' + left + ' ' + top + ';';
    theString += right + ' ' + top + ';' + right + ' ' + bottom + ';' + left + ' ' + bottom + '">\n';

  7. For each of the following javascript files:

    aimsBuffer.js
    aimsClick.js
    aimsCommon.js
    aimsGeocode.js
    aimsIdentify.js
    aimsSelect.js
    aimsQuery
    aimsXML.js

    find:
    Code:
    <ARCXML VERSION="1.0.1">

    and add the ArcXML prologue and update the ARCXML element so that it is consistent with ArcXML 1.1. Change it to:
    Code:
    <?xml version="1.0" encoding="UTF-8"?><ARCXML version="1.1">

    Note:
    In the above step, when searching for...
    Code:
    <ARCXML VERSION="1.0.1">

    ... if it is preceded by a pre-prologue of...
    Code:
    <?xml version="1.0" encoding="Cp1252"?>

    ..., delete this pre-prologue. The pre-prologue may have been added during previous customization of the ArcIMS 3.0 site.
  8. In lines 371, 442, and 462 of aimsSelect.js, change the query requests to use layer id instead of layer name; from
    Code:
    selString +='<DATASET fromlayer="' + LayerName[ActiveLayerIndex] + '" />\n';

    to
    Code:
    selString +='<DATASET fromlayer="' + LayerID[ActiveLayerIndex] + '" />\n';

  9. In lines 123, 153, 164, and 216 of imsBuffer.js, change the buffer requests to use layer id instead of name; from
    Code:
    buffString += '<DATASET fromlayer="' + LayerName[ActiveLayerIndex] + '" />\n';

    to
    Code:
    buffString += '<DATASET fromlayer="' + LayerID[ActiveLayerIndex] + '" />\n';

  10. In the block starting at line 530 of aimsQuery.js, change the lines in the parseStoredQueries() function; from
    Code:
    startpos = theReply.indexOf("<QUERY where=",endpos);
    startpos += 14;
    endpos = theReply.indexOf(dQuote, startpos);
    blurb = theReply.substring(startpos,endpos);
    storedQueryString[storedQueryCount] = blurb;
    startpos = theReply.indexOf("subfields=",endpos);

    to
    Code:
    var sp2 = theReply.indexOf("<QUERY ",endpos);
    sp2 += 7;
    startpos = theReply.indexOf("where=",sp2);
    startpos += 7;
    endpos = theReply.indexOf(dQuote, startpos);
    blurb = theReply.substring(startpos,endpos);
    storedQueryString[storedQueryCount] = blurb;
    startpos = theReply.indexOf("subfields=",sp2);

Article ID:000003862

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic