English

Problem: Unable to set the visibility of a map layer

Description

When using displayLayers to turn additional layers on, the layers do not appear on the map and no error is generated.

Cause

The map layers are not available at the given extent. For instance, when viewing the entire United States, the ZIP code layers will not be available.

Solution or Workaround

Determine which layers are available for a given map.

In v2006 and v2006.1, use the getMaps method with the parameter returnLayers=true.

In v2, use the method getLayerInfoForExtent.