Layer source objects

Overview

This topic discusses the JSON representation of layer source objects.

The following objects are discussed:

  • Dynamic map layer
  • Dynamic data layer
  • Dynamic workspace layer

Dynamic map layer

A dynamic map layer refers to a layer in the current map service. If supported, use gdbVersion to specify an alternate geodatabase version.

1
2
3
4
5
{
  "type": "mapLayer", //required
  "mapLayerId": <layerId>, //required
  "gdbVersion": "<version name>"
}

Dynamic data layer

A dynamic data layer is an on-the-fly layer created off of data from a registered workspace. The following data sources are supported:

1
2
3
4
5
6
7
8
{
  "type": "dataLayer", //required
  "dataSource": <dataSource>, //required
  "fields": [
    {"name":"<fieldName1>","alias":"<fieldAlias1>"},
    {"name":"<fieldName2>","alias":"<fieldAlias2>"}
  ]
}

Dynamic workspace layer

A dynamic workspace layer refers to a pre-authored Layer File (.lyrx) created from ArcGIS Pro. These files reside in a registered folder. It allows you to dynamically use a pre-authored layer, with an advanced renderer and cartographically enriched symbols that are not supported by map service's REST API specifications, to a map service operation on a per request basis. There must be only one layer in a Layer File. For example, you cannot have a group layer or any other composite layer. The source of the layer inside a Layer File cannot be a map service, feature service, or WMS service.

1
2
3
4
5
{
  "type": "workspaceLayer", //required
  "workspaceId": <registered workspace id>>, //required
  "layerId": "<lyrx file name with extension>" //required
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close