Geoprocessing (intersecting / reading attributes / routing) with Javascript API

2835
3
09-23-2015 07:44 AM
wcESRI
by
New Contributor

Hello,

I am attempting to work with the Javscript API do the following.

Enter an address (address 1), intersect a polygon, get an address (address 2) from that polygon and route a line between the resulting points.

I am trying to find the proper functionality in the API to support this processing.

I found the routing support in the sample on the directions app at Directions | ArcGIS API for JavaScript.

There is also an example for point in polygon search at Geoprocessing - Point in polygon search | ArcGIS API for JavaScript .  Is there an basic example of this functionality available?

Does anyone have any example of reading attributes from a selected feature?

Thanks for your time!

0 Kudos
3 Replies
KellyHutchins
Esri Frequent Contributor

Christopher Jursa​ you'll get more replies to JavaScript questions if you post in the ArcGIS API for JavaScript​ space.

For a simple example of reading attributes from a selected feature take a look at the sumPopulation function in this sample:

Select features within a two minute drive time | ArcGIS API for JavaScript

0 Kudos
wcESRI
by
New Contributor

Kelly,  thanks for the help.  Is the CreateDriveTimePolygons geoprocessing service in the example something public that ESRI provides or is it something I would have to create?

 

var gp = new Geoprocessor("url_goes_here");

0 Kudos
KellyHutchins
Esri Frequent Contributor

That's a sample service provided by Esri for writing samples and testing and shouldn't be relied on for production apps. Here's info on how to setup a network service if you need one:

Tutorial: Publishing a network analysis service—Documentation (10.3 and 10.3.1) | ArcGIS for Server

However the reason I linked to that sample was to show an example of how to get attributes from a feature and for that functionality you don't need the network analysis service.

0 Kudos