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.

Referenced by: Map Service Layer (ArcGISMapServiceLayer), Tiled Map Service Layer (ArcGISTiledMapServiceLayer)

Properties

PropertyDetails
defaultVisibilityDefault visibility of the layers in the map service.
disablePopupIndicates whether to allow a client to ignore the popups defined on the layer. The popupInfo object could be saved in the map or item.
idThe layer id, as a numeric value.
layerDefinitionAdditional properties that define drawing information and other configurations for the layer.
See layerDefinition properties table.
layerItemIdThe associated query layer’s itemId. Only available when there is a layerUrl. You will see this if popups are configured on it.
layerUrlA URL to a service that should be used for all queries against the layer.
listModeTo show or hide the sublayer in the layer list. If the layer has sublayers, selecting hide-children will hide them in the layer list.
Valid values:
  • hide
  • hide-children
  • show
maxScaleA number representing the maximum scale at which the layer will be visible. The number is the scale’s denominator.
minScaleA number representing the minimum scale at which the layer will be visible. The number is the scale’s denominator.
nameThe name of the layer.
parentLayerIdIf working with nested layers, this is the numeric value indicating the layer id of the next layer (parent) directly above the current referenced layer.
popupInfoA popupInfo object defining the popup window content for the layer.
showLegendA Boolean indicating if the layer should be shown in the legend in client applications.
subLayerIds[]If the layer is a parent layer, it will have one or more sub layers included in an array.

layerDefinition properties

PropertyDetails
definitionExpressionSQL-based definition expression string that narrows the data to be displayed in the layer.
drawingInfo.labelingInfo[]An array of labelingInfo objects.
drawingInfo.rendererThe renderer object contains the drawing information for the operationalLayer.
drawingInfo.showLabelsLabels will display if this property is set to true and the layer also has a labelingInfo property associated with it.
drawingInfo.transparencyNumber value ranging between 0 (no transparency) to 100 (completely transparent).
sourceAn object indicating the layerDefinition’s layer source.