This content has moved to developers.arcgis.com. Please update your bookmarks!
L.esri.Task
Extends L.Class
L.esri.Task
is a generic class that provides the foundation for calling operations on ArcGIS Online and ArcGIS Server Services like query, find and identify.
Constructor
Constructor | Description |
---|---|
L.esri.task(<Object> L.esri.task(<Service> |
Options includes a url parameter which refers to the ArcGIS Server or ArcGIS Online service you would like to consume. |
Options
Option | Type | Default | Description |
---|---|---|---|
url |
String |
'' |
URL of the ArcGIS Server or ArcGIS Online service you would like to consume. |
proxy |
String |
false |
URL of an ArcGIS API for JavaScript proxy or ArcGIS Resource Proxy to use for proxying POST requests. |
useCors |
Boolean |
true |
If this task should use CORS when making GET requests. |
requestParams |
Object |
null |
Used to pass through arbitrary request parameters to services. |
Methods
Method | Returns | Description |
---|---|---|
request(<String> |
this |
Makes a request to the associated service. The service's URL will be combined with the path option and parameters will be serialized. Accepts an optional function context for the callback. |
apikey(<String> |
this |
Adds an api key to this request if the service requires authentication. Will be added automatically if used with a service. |
token(<String> |
this |
Adds a token to this request if the service requires authentication. Will be added automatically if used with a service. |