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.
You could use a REST API Query with the ObjectId as a parameter - ArcGIS REST API
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.