English

How To: Configure the cache folder to display a 'Data not available' tile for empty map cache areas or missing tiles

Summary

Instructions provided describe how to configure the cache directory to display a 'Data not available' tile for empty map cache areas or when tiles are missing from the cache service.

A 'Data not available' tile can be useful if a user pans to the edge of the map or navigates to an area that has not completed caching or where cache tiles are missing.

Configuring the server to return a 'Data not available' tile can yield a better user experience than returning nothing in some cases.

Procedure

The following instructions are for use with ArcGIS Server 9.3.1 and later versions, for both the .NET and Java platforms.

For ArcGIS Server for the Microsoft .NET Framework 9.3 and previous versions, follow the instructions in the article: Configuring your server to display a 'Data not available' tile for empty map cache areas.

  1. Download the appropriate file from the following links:
    missing.png (512x512)
    missing.jpg (512x512)
    blank.png (512x512)
    missing256.png (256x256) --> Rename to missing.png after downloading
    missing256.jpg (256x256)) --> Rename to missing.jpg after downloading
    blank256.png (256x256) --> Rename to blank.png after downloading
    Note:
    • Use missing.png or blank.png if the cache tile format is PNG and if transparency is required. 
    • Use missing.jpg or blank.jpg if the cache tile format is JPEG and if transparency is not required. 
    • If a clear blank tile is needed, use blank.png instead. This is also used for overlay services that require transparency.
  2. For REST applications such as the JavaScript API, Flex API, or Silverlight API applications, save a missing.png (or missing.jpg) under the _alllayers folder for the map service. For example:
    C:\arcgisserver\arcgiscache\MyMapService\Layers\_alllayers\missing.png

    The ArcGIS Server 9.3.1 (and later versions) Tile Handler automatically handles missing tiles by replacing the expected but missing tiles with the missing.jpg (or missing.png).
  3. For a Web ADF Application, save a missing.png (or missing.jpg) under the _alllayers folder for the map service. For example:
    C:\arcgisserver\arcgiscache\MyMapService\Layers\_alllayers\missing.png
    Additionally, the ArcGIS Server cache directory must be configured without specifying a virtual directory. This forces clients to use the tile handler to request tiles (instead of directly requesting tiles from the virtual directories) which retrieves missing.jpg (or missing.png) when a cache tile is not found.

    Alternatively, for .NET Web ADF Applications, a custom error response on the virtual cache directory can be configured for HTTP Error 404: “Not Found”. Instead of an error message, the Web server returns the tile. This approach is discussed in the ArcGIS Server blog thread from the Related Information section below. This method is used in ArcGIS Server 9.3 and previous versions.

Related Information