Feature (Map Service\Layer)
- URL:http://<layer-url>/<featureId>
- Required Capability:Data
- Version Introduced:10.0
Description
The feature resource represents a single feature in a layer in a map service.
The feature resource has 2 child resources:
- Attachment Infos: Returns information about attachments associated with this feature. This resource is available only if the layer has advertised that it has attachments.
- HTML Popup: Returns information about the HTML popup associated with this feature.
New in 10.1
- Support for returnZ and returnM was added for feature resource. Default value for returnZ and returnM is false.
- Support for gdbVersion parameter was added. Use this parameter to specify the geodatabase version to query.
Resource Hierarchy
Request Parameters
Parameter |
Details |
---|---|
f |
Description: The response format. The default response format is html. Values: html | json |
returnZ | //This option was added at 10.1. 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 | //This option was added at 10.1. 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. |
gdbVersion | //This option was added at 10.1. Description: GeoDatabase version to query. This parameter applies only if hasVersionedData property of the service and isDataVersioned property of the layer(s) queried are true. If this is not specified, query will apply to published map's version. Syntax: gdbVersion=<geodatabase version> Example: gdbVersion=sde.USER1 |
Example Usage
JSON Response Syntax
{ "feature" : <feature> }
JSON Response Example
{
"feature" :
{
"attributes" : {
"OBJECTID" : 1,
"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]
]
]
}
}
}