English

How To: Work with transparencies in an ArcGIS Server Web mapping application

Summary

Instructions provided describe how to implement transparency for various versions of ArcGIS Server, map services, and clients. While transparency is set and defined while authoring a map document, the client application that consumes the map service is ultimately responsible for rendering the map image in the way that the map is intended to be displayed.

There are two main differences in transparency workflows: ArcGIS Server MXD based services and ArcGIS Server 9.3.1 optimized map services (MSD). These two workflows exist primarily because of the output image type ArcGIS Server generates and the client application’s (Web browser) ability to render the image.

ArcGIS Server 9.2, 9.3, and 9.3.1 map services based off an ArcMap document (MXD) will honor layer transparency for the following scenarios:

1) A single service that has a transparent layer; the service is either cached or dynamic (non-cached).
2) Multiple dynamic map services (non-cached) that have transparencies defined.

Warning:
There is a known Microsoft Internet Explorer 6 issue that limits the ability for PNG24 tiles to work with transparency.

ArcGIS Server 9.3.1 services that make use of the new optimized map service based off an MSD will honor transparency for the following scenarios:

1) A single service that has transparency defined; the service is either cached or dynamic (non-cached).
2) Multiple dynamic map services (non-cached) that have transparencies defined.
3) Multiple cached map services that have transparencies defined.

ArcGIS Server 9.3.1 optimized map services have been enhanced to generate output images of PNG32 type. PNG32 image format supports a fourth band, Alpha, which allows the individual pixels of an output image to retain transparency information that the client application will render against.

See Procedure B to setup transparency in an optimized map service.

Procedure

Use the appropriate procedure below.

See the following link about setting transparency within ArcMap for more information.

  • Procedure A

    1. Multiple cached map services in a Web application cannot use the transparency setting applied within ArcMap on individual layers. Within ArcMap, remove the layer from the MXD that requires transparency.

    Create a new ArcMap document with this single layer inside and publish this as a new service to ArcGIS Server.

    2. When constructing the Web application through the ArcGIS Server Manager, transparency will be applied to the individual service with the layers that require transparency.

    To apply transparency to the individual service with the layer(s) that require transparency, refer to the following instructions for ArcGIS Server .NET Manager:

    a. Create a new application from ArcGIS Server Manager.
    b. Bring each map service into the appropriate application and arrange each map service from top to bottom in the proper order of display.
    c. Click the Preview Layers tab.
    d. Select the service that requires transparency.
    e. Enter a numeric value (0-100%) for that particular service transparency value.

    [O-Image]

    f. Click Apply.
    g. Continue building the Web application as usual.
  • Procedure B

    1. Multiple cached map services and dynamic services can retain transparency within an optimized map service if published using a tile format of PNG32.

    2. Within ArcMap 9.3.1 set the layer transparency on the desired layer.

    a. Set the layer transparency on the desired layer.
    b. Run the analyze map tool from the Map Service Publishing toolbar and view the warning 10009 for the layer with transparency.
    c. Optionally, set 'Use Color Transparency' by right-clicking the error. See the following help link on Color vs. Layer transparency: Enabling the option to convert layer transparency to color transparency may improve performance.
    d. Publish the optimized map service.

    3. Consume the map service inside the client application.

Related Information