Feature (Map Service/Dynamic Layer)

URL:
https://<dynamic-layer-url>/<featureId>
Methods:
GET
Child Resources:
HTML Popup, Attachment Infos
Required Capability:
Data
Version Introduced:
10.1

Description

The resource is supported from 10.1 onwards.

The feature resource represents a single feature in a dynamic layer in a map service. The feature has 1 child resource:

  • Attachment Infos: Returns information about attachments associated with this feature. This resource is available only if the layer has advertised that it has attachments.

Request Parameters

ParameterDetails

f

Description: The response format. The default response format is html.

Values: html | json

layer

Description: Dynamic layer/table source definition.

Syntax:

Use dark colors for code blocksCopy
1
2
3
4
{
    "id": <layerOrTableId>,
    "source": <layer source>
  }

Example:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
{
  "id": 101,
  "source":
  {
    "type": "mapLayer",
    "mapLayerId": 0,
    "gdbVersion": "SDE.DynamicLayers"
  }
}

returnZ

Description: If true , Z values will be included in the results if the features have Z values. Otherwise, Z values are not returned. The default is false .

returnM

Description: If true , M values will be included in the results if the features have M values. Otherwise, M values are not returned. The default is false .

Example Usage

Example 1: Feature resource for feature in a dynamic layer (feature with objectId 1 from mapLayer with id 3):

https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/dynamicLayer/1?layer={"id":101,"source":{"type":"mapLayer","mapLayerId":3}}&f=pjson

JSON Response Syntax

Use dark colors for code blocksCopy
1
{ "feature" : <feature> }

JSON Response Example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
  "feature" :
  {
    "attributes" : {
      "OBJECTID" : 7,
      "BTID" : 1,
      "NAME" : "NOTNAMED",
      "LAT" : 28,
      "LONG" : -94.8,
      "WIND_KTS" : 80,
      "PRESSURE" : 0,
      "CAT" : "H1",
      "BASIN" : "North Atlantic",
      "TRACK_DATE" : -3740169600000,
      "Shape_Length" : 0.600000000000023
    }
    ,
    "geometry" :
    {
      "paths" :
      [
        [
          [-94.7999999999999, 28.0000000000001],
          [-95.3999999999999, 28.0000000000001]
        ]
      ]
    }
  }
}

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