Skip To Content ArcGIS for Developers Sign In Dashboard

Web Map Specification

Map Service Layer (ArcGISMapServiceLayer)

ArcGIS web maps are designed to work with web services hosted on ArcGIS Server and ArcGIS Online, in addition to other types of servers. Map services can be cached (tiled) or uncached (dynamic). This object specifically details properties within uncached map services.

Properties

Property Details
id A unique identifying string for the layer.
isReference This is applicable if used as a baseMapLayer. A boolean value indicating whether or not the baseMapLayer draws on top (true) of other layers, including operationalLayers , or below (false).
itemId Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal.
layerType String indicating the layer type.
Value of this property must be ArcGISMapServiceLayer
layers An array of layer objects defining the styling, geometry, and attribute information for the features.
See layers properties table.
maxScale A number representing the maximum scale at which the layer will be visible. The number is the scale's denominator.
minScale A number representing the minimum scale at which the layer will be visible. The number is the scale's denominator.
opacity The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency.
refreshInterval Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled.
showLegend Indicates whether to allow map authors the ability to control what layers should be shown in a client's legend.
thematicGroup (Optional) A thematicGroup object used in ArcGISMapServiceLayer layers.
timeAnimation This property is applicable to layers that support time. If 'true', timeAnimation is enabled.
title A user-friendly string title for the layer that can be used in a table of contents.
url The URL to the layer.
visibility Boolean property determining whether the layer is initially visible in the web map.
visibleLayers An array of sublayer ids that should appear visible. Used with map service layers that are not tiled.

layers properties

Property Details
defaultVisibility Default visibility of the layers in the map service.
definitionEditor An object that provides interactive filters.
disablePopup 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.
id The layer id, as a numeric value.
layerDefinition The layerDefinition object defines the attribute schema and drawing information for the layer.
layerItemId The associated query layer's itemId. Only available when there is a layerUrl. You will see this if popups are configured on it.
layerUrl A URL to a service that should be used for all queries against the layer.
maxScale A number representing the maximum scale at which the layer will be visible. The number is the scale's denominator.
minScale A number representing the minimum scale at which the layer will be visible. The number is the scale's denominator.
name The name of the layer.
parentLayerId 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 A popupInfo object defining the popup window content for the layer.
showLegend A 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.

operationalLayer Example

Live sample web maps showing the ArcGISMapServiceLayer as an operationalLayer

{
  "operationalLayers": [
    {
      "id": "Census_6367",
      "layerType": "ArcGISMapServiceLayer",
      "url": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer",
      "visibility": true,
      "opacity": 1,
      "title": "Census"
    }
  ]
}

baseMapLayer Example

Live sample web maps showing the ArcGISMapServiceLayer as a baseMapLayer

{
  "baseMapLayers": [
    {
      "id": "defaultBasemap",
      "layerType": "ArcGISMapServiceLayer",
      "url": "https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer",
      "visibility": true,
      "opacity": 1,
      "title": "Topographic"
    },
    {
      "id": "Census_6367",
      "layerType": "ArcGISMapServiceLayer",
      "url": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer",
      "visibility": true,
      "opacity": 1,
      "title": "Census",
      "showLegend": true
    }
  ],
  "title": "Topographic"
}

Feedback on this topic?