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

ConstructorDescription
L.esri.task(<Object>options) L.esri.task(<Service>endpoint)Options includes a url parameter which refers to the ArcGIS Server or ArcGIS Online service you would like to consume.

Options

OptionTypeDefaultDescription
urlString''URL of the ArcGIS Server or ArcGIS Online service you would like to consume.
proxyStringfalseURL of an ArcGIS API for JavaScript proxy or ArcGIS Resource Proxy to use for proxying POST requests.
useCorsBooleantrueIf this task should use CORS when making GET requests.
requestParamsObjectnullUsed to pass through arbitrary request parameters to services.

Methods

MethodReturnsDescription
request(<String> url, <Object> params, <Function> callback, <Object> context)thisMakes 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> apikey)thisAdds an api key to this request if the service requires authentication. Will be added automatically if used with a service.
token(<String> token)thisAdds a token to this request if the service requires authentication. Will be added automatically if used with a service.

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