English

How To: Display background color or more than one Image MapService in a Java Web site

Summary

The background color of a Web site will be obscured by any Image MapService that has a default (opaque) background. Similarly, if you want to use more than one Image MapService in a Java-viewer Web site, the opaque background of the initial Image MapService will obscure the other Image MapServices.

In such cases, you must set the background to a "transparent color" in the Map Configuration file for each Image MapService. As well, Image MapServices must use either the PNG or GIF image format.

Procedure

  1. Open the Map Configuration (.axl) file associated with an Image MapService in a text editor.
  2. Add the following line to the Properties section.

    Code:
    <BACKGROUND color="255,255,255" transcolor="255,255,255" />

    For example . . .

    Code:
    <PROPERTIES>
    <ENVELOPE minx="-122.5134" miny="37.7082" maxx="-122.355376" maxy="37.8325" name="Initial_Extent" />
    <MAPUNITS units="decimal_degrees" />
    }<BACKGROUND color="255,255,255" transcolor="255,255,255" /
    </PROPERTIES>


    Note:
    It is not necessary to use "255". Any valid value (0-255) is OK as long as the RGB value for the color attribute is identical to that of the transcolor attribute.

  3. Save the .axl file.
  4. Open ArcIMS Administrator.
  5. Set the Image MapService to use the PNG (8-bit only) or GIF image formats.
  6. Refresh the Image MapService.
  7. Close Internet Explorer and reopen to view the changes.

Related Information