{
  "title": "layer",
  "type": "object",
  "$schema": "http://json-schema.org/draft-04/schema",
  "description": "A layer object may allow overrides on popup content and drawing behavior for individual layers of a web service. This object also contains geographic features and their attributes when used in a feature collection.",
  "properties": {
    "defaultVisibility": {
      "type": "boolean",
      "description": "Default visibility of the layers in the map service."
    },
    "definitionEditor": {
      "type": "object",
      "description": "An object that provides interactive filters.",
      "$ref": "definitionEditor_schema.json"
    },
    "disablePopup": {
      "type": "boolean",
      "description": "Indicates whether to allow a client to ignore the popups defined on the layer. The popupInfo object could be saved in the map or item.",
      "default": false
    },
    "featureSet": {
      "type": "object",
      "description": "A featureSet object containing the geometry and attributes of the features in the layer.",
      "$ref": "featureSet_schema.json"
    },
    "field": {
      "type": "object",
      "description": "Information about each field in a layer. Used with feature collections.",
      "$ref": "field_schema.json"
    },
    "id": {
      "type": "number",
      "description": "The layer id, as a numeric value."
    },
    "layerDefinition": {
      "type": "object",
      "description": "The layerDefinition object defines the attribute schema and drawing information for the layer.",
      "$ref": "layerDefinition_schema.json"
    },
    "layerItemId": {
      "type": "string",
      "description": "The associated query layer's itemId. Only available when there is a `layerUrl`.  You will see this if [popups are configured](https://doc.arcgis.com/en/arcgis-online/manage-data/publish-tiles-from-features.htm) on it."
    },
    "layerUrl": {
      "type": "string",
      "description": "A URL to a service that should be used for all queries against the layer."
    },
    "listMode": {
      "type": "string",
      "description": "To show or hide the sublayer in the layer list. If the layer has sublayers, selecting `hide-children` will hide them in the layer list.",
      "enum": [
        "hide",
        "hide-children",
        "show"
      ]
    },
    "maxScale": {
      "type": "number",
      "description": "A number representing the maximum scale at which the layer will be visible. The number is the scale's denominator."
    },
    "minScale": {
      "type": "number",
      "description": "A number representing the minimum scale at which the layer will be visible. The number is the scale's denominator."
    },
    "name": {
      "type": "string",
      "description": "The name of the layer."
    },
    "nextObjectId": {
      "type": "integer",
      "description": "Iterates within a featureset. Number objectId value is incremented 1 based on last Object ID defined for the feature in a featureset. Used with feature collections."
    },
    "parentLayerId": {
      "type": "number",
      "description": "If working with nested layers, this is the numeric value indicating the layer id of the next layer (parent) directly above the current referenced layer."
    },
    "popupInfo": {
      "type": "object",
      "description": "A popupInfo object defining the popup window content for the layer.",
      "$ref": "popupInfo_schema.json"
    },
    "showLabels": {
      "type": "boolean",
      "description": "A Boolean indicating if the layer should display labels in client applications.",
      "default": true
    },
    "showLegend": {
      "type": "boolean",
      "description": "A Boolean indicating if the layer should be shown in the legend in client applications.",
      "default": true
    },
    "subLayer": {
      "type": "integer",
      "description": "Integer value indicating the layer id."
    },
    "subLayerIds": {
      "type": "array",
      "description": "If the layer is a parent layer, it will have one or more sub layers included in an array.",
      "items": {
        "type": "integer"
      }
    },
    "title": {
      "type": "string",
      "description": "A user-friendly string title for the layer that can be used in a table of contents."
    }
  },
  "additionalProperties": false
}
