Select to view content in your preferred language

Extract Data Sample JavaScript API

7299
9
05-04-2016 07:00 AM
BruceRalston
Emerging Contributor

I have a GP service on my ArcServer machine that performs an Extract Data process (clip, zip, and ship).  I would like to call it using the JavaScript API.  When I search for samples using this from the API documentation, it comes back as "0 samples found".   I tend to learn best from studying samples, so this lack of an example is a problem.  There is a sample for the Flex API, but I am trying to move away from Flex.  Any working example code would be appreciated.

Tags (1)
9 Replies
TimWitt2
MVP Alum
BruceRalston
Emerging Contributor

Tim,

This is a nice application, but it does not quite address my issue.  I would like a sample that uses the Extract Data widget (that is, that allows the user to download the shape file for a layer).   Thanks for the link to the sample. It is interesting.

0 Kudos
ArtemisFili
Esri Contributor

This sample can be found if you download the 3.15 or earlier SDK locally. To make it easier, I have attached it to this post as well.

JúlioCaineta
Deactivated User

Artemis, thank you for providing an example to extract data.

However, that example does not use the ExtractData widget. Instead, it uses a Geoprocessor and then builds around it.

Is it possible to use this widget with a GP Service, locally hosted on Arcgis Server? If so, how should the service be set up in order to be compatible with the widget?

0 Kudos
YueWu1
by Esri Regular Contributor
Esri Regular Contributor
0 Kudos
deleted-user-0W0-oLHxDjCX
Deactivated User

What is the user and password yracub ?

Have you already tried with an image service too?

0 Kudos
YueWu1
by Esri Regular Contributor
Esri Regular Contributor

You need to put your ArcGIS Online credentials to login, because this ExtractData consumes credits.

You can switch the featureLayer reference to image service' url and Class in the JavaScript panel, and it should work.

JS Bin - Collaborative JavaScript Debugging 

deleted-user-0W0-oLHxDjCX
Deactivated User

The consumption of credits is debited from your account or from mine? I couldn't see any change on my organization account credit.

0 Kudos
AndyYang
Occasional Contributor

Hi @ArtemisFili 

Thank you for your example shared - is the Geoprocessor server private?

(http://sampleserver4.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/Incident_Data_Extraction... ?) - I tried to execute the function but the error popped up and it cannot be done so I wonder if the service itself is not available?

0 Kudos