{
  "title": "Group Layer",
  "type": "object",
  "$schema": "http://json-schema.org/draft-04/schema",
  "description": "GroupLayer provides the ability to organize several sublayers into one common layer. Suppose there are several FeatureLayers that all represent water features in different dimensions. For example, wells (points), streams (lines), and lakes (polygons). The GroupLayer provides the functionality to treat them as one layer called Water Features even though they are stored as separate feature layers.",
  "properties": {
    "id": {
      "type": "string",
      "description": "A unique identifying string for the layer"
    },
    "layerType": {
      "type": "string",
      "description": "String indicating the layer type",
      "enum": [
        "GroupLayer"
      ]
    },
    "layers": {
      "type": "array",
      "description": "list of child operationalLayers",
      "items": {
        "type": "object",
        "$ref": "operationalLayers_schema.json"
      },
      "uniqueItems": true
    },
    "listMode": {
      "type": "string",
      "description": "To show or hide the group layer in the layer list",
      "enum": [
        "hide",
        "hide-children",
        "show"
      ]
    },
    "opacity": {
      "type": "number",
      "description": "The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency."
    },
    "title": {
      "type": "string",
      "description": "A user-friendly string title for the layer that can be used in a table of contents. If this is not included, a title is derived from the service"
    },
    "visibility": {
      "type": "boolean",
      "description": "Boolean property determining whether the layer is initially visible in the web scene",
      "default": true
    },
    "visibilityMode": {
      "type": "string",
      "description": "How visibility of children is affected:independent, exclusive, inherited",
      "enum": [
        "exclusive",
        "independent",
        "inherited"
      ]
    }
  },
  "required": [
    "id",
    "layerType",
    "title"
  ],
  "additionalProperties": false,
  "esriDocumentation": {
    "examples": [
      {
        "title": "groupLayer",
        "description": "Live sample web scene showing [groupLayer](https://www.arcgis.com/home/webscene/viewer.html?webscene=74ec7d6ca482442ba24f80b708aec67e)",
        "code": {
          "operationalLayers": [
            {
              "id": "scenarios",
              "layerType": "GroupLayer",
              "visibilityMode": "exclusive",
              "listMode": "show",
              "opacity": 1,
              "title": "Building Scenarios",
              "visibility": true,
              "layers": [
                {
                  "id": "devA",
                  "opacity": 1,
                  "title": "Dev A Buildings",
                  "url": "https://scenesampleserverdev.arcgis.com/arcgis/rest/services/Hosted/DevA_BuildingShell_Textured/SceneServer/layers/0",
                  "visibility": true,
                  "layerType": "ArcGISSceneServiceLayer",
                  "itemId": "e3e09257b8e14872b56b4801b01e6c6e"
                },
                {
                  "id": "devB",
                  "opacity": 1,
                  "title": "DevB Buildings",
                  "url": "https://scenesampleserverdev.arcgis.com/arcgis/rest/services/Hosted/DevB_BuildingShell_Textured/SceneServer/layers/0",
                  "visibility": false,
                  "layerType": "ArcGISSceneServiceLayer",
                  "itemId": "3e6ac251b62b4f02a58fd942f80fd369"
                }
              ]
            }
          ]
        }
      }
    ]
  }
}
