Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Web and Mobile ArcGIS Server Applications with JavaScript ??? Second Edition

You're reading from   Building Web and Mobile ArcGIS Server Applications with JavaScript ??? Second Edition Build exciting custom web and mobile GIS applications with the ArcGIS Server API for JavaScript

Arrow left icon
Product type Paperback
Published in Oct 2017
Publisher Packt
ISBN-13 9781787280526
Length 324 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Eric Pimpler Eric Pimpler
Author Profile Icon Eric Pimpler
Eric Pimpler
Mark Lewin Mark Lewin
Author Profile Icon Mark Lewin
Mark Lewin
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Introduction to HTML, CSS, and JavaScript FREE CHAPTER 2. Creating Maps and Adding Layers 3. Adding Graphics to the Map 4. The Feature Layer 5. Using Widgets and Toolbars 6. Performing Spatial and Attribute Queries 7. Identifying and Finding Features 8. Turning Addresses into Points and Points into Addresses 9. Directions and Routing 10. Geoprocessing Tasks 11. Geometry Operations 12. Integration with ArcGIS Online 13. Creating Mobile Applications 14. Looking Ahead - Version 4 of the ArcGIS API for JavaScript

The Geoprocessor task


The Geoprocessor class in the ArcGIS API for JavaScript is what coordinates the input parameters, executes the geoprocessing task, and coordinates the collection of the task results. In this way, it is very similar to the other tasks you have worked with in this book, such as the QueryTask.

You kick off the geoprocessing operation by calling either Geoprocessor.execute() or Geoprocessor.submitJob() and passing in the required input parameters. We'll discuss the difference between these two methods later. After executing the geoprocessing task, the results are returned to the Geoprocessor object where they are processed by a callback function.

To create an instance of the Geoprocessor task, import the esri/tasks/Geoprocessor module and supply the URL of the geoprocessing service to the class constructor:

require(["esri/tasks/Geoprocessor"], function(Geoprocessor) { 
    var url = "<gp service url>"; 
    var gp = new Geoprocessor(url); 
}); 
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime