Layer Themes

A layer theme is a subset of the Layer List, optionally with different visibility settings for the layers. The layers that are included in a layer theme usually have some theme in common. For example, you could define a Hydrography layer theme that turns on the map's water-related layers, such as layers for streams, lakes, and watersheds, and turns off layers that are not related to water.

Layer themes make it possible to quickly flip between sets of layers that are defined for different purposes. When a user selects a layer theme, the map redraws to show the layers in the layer theme, and the Layer List refreshes to list the layers that are included in the layer theme. This streamlines and specializes layer selection.

Switch quickly between different layer themes

Common Uses of Layer Themes

Some common uses for layer themes are:

Layer Theme Permissions

Layer themes are securable. If the site is secured, you can give some users permission to use a particular theme, and deny permission to other users. For information, see Permissions.

Layer Theme Configuration and Behavior

Layer themes are configured on Manager's Layer Themes page. A site must have at least one layer theme, which is the theme that loads when the viewer launches. Initially, the All Available Layers theme is the default theme.

If the user selects a different default layer theme, the map redraws and the list of layers changes to the layer theme's list. If there are search results, selections, markup, and user-added layers when the user changes the theme, these items may no longer be available. Their availability depends on whether the layer is included and visible in the new layer theme.

All Available Layers

By default, every site has a layer theme called All Available Layers, which corresponds to the full Layer List.

The All Available Layers layer theme includes all the layers that the Layer List includes, with the same visibility settings as the Layer List. If you add or remove a layer from the Layer List or you change a visibility setting, your changes are reflected in the All Available layers theme.

You can hide the All Available Layers theme so it does not appear in viewers. For information see Hide the "All Available Layers" Theme.

Add and Edit Layer Themes

Initially, when you add a new layer theme, all the map services, layers, and folders that are included in the Layer List are also included in the theme. You can exclude any map services, layers, and folders that you want.

When you exclude a layer, the layer does not show in the map or in the list of layers, and the layer's data is not available for client-side operations like search. If you exclude an item that contains other items, all the contained items are also excluded. Layer themes automatically appear in the drop-down menu of available themes at the top of the Layer List.

Layer Visibility

Each map service and layer that is included in a layer theme has a visibility setting in the theme. The visibility that you configure in the layer theme overrides the visibility that is configured in the Layer List.

Layer Themes and the Basemap Switcher

The layer theme affects which basemaps show in the Basemap Switcher. When the user changes the layer theme, the basemaps that are available in the new layer theme are loaded into the Basemap Switcher and replace the basemaps from the previous layer theme.

A basemap is available in a layer theme if one or more of its map services is included in the layer theme. When a user selects a basemap with a mix of included and excluded map services, only the map services that are included in the layer theme show on the map.

If all of a basemap's map services are excluded from a layer theme, then the basemap does not show in the Basemap Switcher when that layer theme is selected.

See also...

The Layer List

Layer Themes in the Viewer

Layer themes behave in the viewer in the following ways:

Add a Layer Theme

To add a layer theme to a site:

  1. In Manager, edit the site that you want to configure, and then select Layer Themes from the side panel.

  2. Click the Edit icon in the Layer Themes toolbar on the Layer Themes page.

    Location of icon to add, edit, and remove layer themes

  3. Click Add New Layer Theme.

    A new theme appears at the bottom of the list.

  4. Type in a name for the layer theme.

    Choose a name that is meaningful to end users. The name appears in the list of themes in the viewer.

  5. If you want the new layer theme to load when the viewer is launched, select the Default button beside the theme.

  6. If you want to move the layer theme to a different position in the list, grip the Sort Layer Theme handle the theme and drag it to its new position in the list.

    Layer themes appear in the viewer in the same order that they appear in Manager.

  7. Click OK.

    The layer theme is created.

  8. Select the new theme in the drop-down list in the Layer Themes toolbar at the top of the Layer Themes page.

    The Include and Exclude icons should also appear in the Layer Themes toolbar. If you do not see these icons, make sure you have selected a custom layer theme—the icons are not displayed when the predefined All Available Layers theme is selected.

  9. Configure which map services, layers, and folders you want to have in the theme:

    Exclude Items

    • To exclude an item (and its nested items), click the Include icon next to the item.

      The item's text and icon are dimmed .

    • To exclude all items, use the Exclude icon in the Layer Themes toolbar.

      If the list contains many items, most of which will be excluded, it is quicker to exclude them all and then re-include individual items than it is to exclude individual items.

    Include Items

    • To re-include an item that you have excluded, click the item's Include icon .

      If the item contains other items, the contained items will also be re-included.

    • To include all items, click the Include icon in the Layer Themes toolbar.

      By default, all items are included.

  10. Configure the default visibility of the layers that are included in the layer theme:

    • Select the checkbox next to a layer to show it on the map when the layer theme loads.

    • Clear the checkbox next to a layer to hide it on the map when the layer theme loads.

  11. Click Apply Changes.

Hide the "All Available Layers" Theme

Every site has a layer theme called All Available Layers. The All Available Layers theme corresponds to the Layer List. It includes all the layers that the Layer List includes, with the same visibility settings as the Layer List. If you add or remove a layer from the Layer List or you change a visibility setting, your changes are reflected in the All Available Layers theme.

You cannot remove the All Available Layers theme, but you can hide it so that it does not appear in viewers. In order to hide the All Available Layers theme, the site must have at least one other layer theme configured.

To hide the All Available Layers theme:

  1. In Manager, edit the site that you want to configure, and then select Layer Themes from the side panel.

  2. Click Edit in the Layer Themes toolbar.

  3. Clear the Allow All Layers checkbox.

    When you clear the checkbox, the next layer theme in the list becomes the default layer theme.

    Location of the checkbox to clear

  4. Select the Default button for the layer theme that you want to load when the viewer is launched.

  5. Click OK.

  6. Click Save Site.

Reorder the List of Layer Themes

Layer themes appear in the viewer in the same order that they appear in Manager. You can reorder the list of layer themes by moving individual layer themes within the list.

To reorder the list of layer themes:

  1. In Manager, edit the site that you want to configure, and then select Layer Themes from the side panel.

  2. Click Edit in the Layer Themes toolbar.

  3. Drag and drop the Sort Layer Theme icon next to a layer theme to move it in the list.

    Repeat this step until you are satisfied with the order of the layer themes.

  4. Click OK.

  5. Click Save Site.