Is there a JSAPI for MapServer/<layerid>/<objectid>?

3703
2
05-08-2015 12:28 PM
ericliprandi
New Contributor III

We need to query for single features within our JS application (like when a customer wants to see details about a particular feature).

We would like to use the following URL on our ArcGIS server:

https://<server>/arcgis/rest/services/<service>/MapServer/<layer>/<objectid>

Esri usually provides wrapper for most of those APIs to handle authentication, proxy and error handling. Is there a wrapper for the above URL?

We have been using QueryTask so far, but it's a lot more verbose than we need (and requires more setup). We simply need the Attributes and Geometry of a single feature.

Tags (2)
2 Replies
OwenEarley
Occasional Contributor III

You could use a REST API Query with the ObjectId as a parameter - ArcGIS REST API

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Eric,

   Other than a FeatureLayer or the QueryTask, no there is nothing light weight or less verbose. Unless you just work with esriRequest and parse the results yourself directly from the rest service.

0 Kudos