

See this post for a sample Spatial query in ArcGIS Javascript Api 3.1ģ) I'm sure you could do it with php accessing a shapefile library, write it out, zip it up and send back a link, but I don't have a recipe for you. You could potentially put json geometry into a column. DataTables has a plugin called TableTools that can save table data as a CSV file among other things - it includes a tiny flash plugin for the local file saving. It uses a file gdb, but you should be able to change it to a shapefile if you need.Ģ) In javascript, I've successfully used the jquery based DataTables library to create a very functional data grid.

Take a look at the clip-and-ship example. You call this service from the javascript API using. Var viewshedGraphics = resultFeatures.1) If you want to create a shapefile for download, you should be able to publish an async geoprocess that will return a link to the location of the generated shapefile on your ArcGIS Server. Assign each resulting graphic a symbol Symbology is assigned and the graphics are added to the map. An Asynchronous service will use gp.submitJob. In this instance, the service is Synchronous Execute InputGraphicContainer.push(inputGraphic) įeatureSet.features = inputGraphicContainer Step 2: Set up input parameters and assign or collect inputs from user Step 1: Initialize the geoprocessing and point to the REST URL Add it along with other dojo.require statements. The sample in the JavaScript help provides a complete example, whereas the following only produces a working web page with additional code:
ARCGIS JAVASCRIPT API CODE
The following JavaScript code is taken from Calculate Viewshed sample with only the relevant pieces to demonstrate the four steps required to execute geoprocessing tools. Getting and handling the result or results.Otherwise, the remainder of this section outlines the following process to add geoprocessing to your web app: If you're already comfortable with JavaScript and geoprocessing, you may want to review the samples and code snippets. Although you can construct any app that can communicate with the service over REST, the following discussion focuses on JavaScript. Typically, a custom web app is constructed using ArcGIS API for JavaScript. To learn more about using web tools with ArcGIS REST API, see Geoprocessing services.
ARCGIS JAVASCRIPT API HOW TO
In the geoprocessing context, one or more tools compose the resources of a service. This guide describes how to use ArcGIS API for JavaScript to build compelling web apps that unlock your data’s potential with interactive user experiences and stunning 2D and 3D visualizations.

You can build a web app from scratch using ArcGIS API for JavaScript. The geoprocessing service that powers a web tool can be consumed in a custom web app, providing the clients of your web app with geoprocessing and analysis solutions.
