AnsweredAssumed Answered

How to use ExtractData Widget analysis tool in custom arcgis javascript application(not in webappbuilder) ?

Question asked by infosysmaps on Sep 16, 2018
Latest reply on Sep 17, 2018 by rscheitlin

How to use ExtractData analysis tool in custom arcgis javascript application(not in webappbuilder) ? When I am trying to use ExtractData widget in custom arcgis javascript application, I am getting exception in javascript console.

 

This is the code I am using to create ExtractData widget.

var fl = new FeatureLayer('https://services9.arcgis.com/XXmFAZwIjv261clN/arcgis/rest/services/polygon/FeatureServer/0?token=MFWbDxpXWsWd7rsy0gbZVOVCK1E4w4xQW3d--K-mfUxADEf6hHwf9gDiMg53n2umOGDgClBgmXec_h0cyBCE-Ng40wkE4nwc1EVNZtwIPOgiSu2mOfBQZLxorrpc-NK34osDjVTJ4_1hepporbTobgH96qETypaAd01E9SRLydjRIimCsIzf39gehdwSkoAFQqXYMBAJnEm3ZdadTH7NQwrQDunhW7yDCwLaRQIMnecBir1-fwoaKQwDQBIClJrR');
map.addLayers([fl]);


var extractData = new ExtractData({
analysisGpServer:"https://analysis9.arcgis.com/arcgis/rest/services/tasks/GPServer/ExtractData",
featureLayers: [fl],
dataFormat:"KML",
map: map,
portalUrl: "https://infosysmap.maps.arcgis.com"
}, "analysis-tool");
extractData.startup();

 

This is the exception I am getting.

init.js:37 TypeError: Cannot read property 'indexOf' of undefined
at ExtractData.js:20
at Object.filter (init.js:71)
at Object._setFeatureLayersAttr (ExtractData.js:20)
at Object.set (init.js:360)
at Object.advice (init.js:119)
at Object.<anonymous> (init.js:117)
at Object.<anonymous> (atBindingExtension.js:3)
at Object.advice (init.js:118)
at Object.c [as set] (init.js:119)
at Object._applyAttributes (init.js:356)

 

Please also help me with the parameters of ExtractData widget.

Outcomes