L.esri.Related.Query

Extends L.esri.Task

An abstraction to assist querying related tables published in ArcGIS Server or ArcGIS Online. You can find more information and the source code for this plugin here.

Constructor

Extends L.esri.Task

ConstructorOptionsDescription
L.esri.Related.query(<L.esri.FeatureLayer>endpoint)orL.esri.Related.query(<Object>options)<L.esri.FeatureLayer> or <Options>Accepts either an options object or an instance of L.esri.FeatureLayer .

Options

Accepts all L.esri.Task options. When used, the url option is required.

Methods

MethodReturnsDescription
objectIds(<Array>objectIds or <String>objectId)thisThe ObjectId(s) of the features to query for related records.
relationshipId(<String>relationship id)thisThe id of the relationship itself.
run(<Function>callback)thisExecutes the query, passing the previously supplied input parameters.
fields(<Array>fields or <String>field)this(Optional) Indicates which fields from matched records to include in response (default is 'all').
returnGeometry(<Boolean>true, <Object>value)this(Optional) Indicates whether or request the geometry of response features (default is true).
returnZ(<Boolean>true, <Object>value)this(Optional) Indicates whether to request information about elevation in response features (default is true).
returnM(<Boolean>true, <Object>value)this(Optional) Indicates whether to request information about 4-D M values in response features (default is false).
precision(<Number>number, <Object>value)this(Optional) Indicates the desired decimal precision of response feature geometries.
definitionExpression(<String>sqlfilter, <Object>value)this(Optional) An opportunity to specify a SQL where clause to further filter results. (Sample: "STATE_NAME = 'California'")

Results

PropertyTypeDescription
features[<L.geoJSON>]The result of a valid request will be composed of an array of L.geoJSON features.

Sample

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
{
    features: [{
        "type": "Feature",
        "properties": {
        ...
        },
        "id": 1
    },
    ...
    ]
}

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