I am trying to set the Spatial Reference as seen below...but for some reason its not liking it...
gpParametersInsert.outputSpatialReference = SpatialReference.createWgs84();
If I include the line above as seen in the code below and run the app I get an error window that pops up....no error in the console.log
"AppStudio for ArcGIS AppRun has stopped woroking"
ANY ideas?
var gpParametersInsert = ArcGISRuntimeEnvironment.createObject("GeoprocessingParameters",
{executionType: Enums.GeoprocessingExecutionTypeAsynchronousSubmit});
// Request the output features be WGS84
gpParametersInsert.outputSpatialReference = SpatialReference.createWgs84();
var inputsI = {};
inputsI["Item"] = ArcGISRuntimeEnvironment.createObject("GeoprocessingString", {value: varItem});
gpParametersInsert.inputs = inputsI;
// Create the job that handles the communication between the application and the geoprocessing task
insertCursorJob = insertCursorTask.createJob(gpParametersInsert);
insertCursorJob.start();
I am trying to update the Object for gpParametersInsert to include a Spatial Reference....but its erroring out as seen above
qml: gp job: {"objectName":"","objectType":"GeoprocessingJob","error":null,"objects":{},"json":{"geoprocessingJob":{"needGpMapServiceUrl":false,"parameters":{"executionType":"submit","parameters":[{"dataType":"GPString","direction":"esriGPParameterDirectionInput","name":"aItem","value":"shooter"},{"dataType":"GPString","direction":"esriGPParameterDirectionInput","name":"bPublicPrivate","value":"public"},{"dataType":"GPString","direction":"esriGPParameterDirectionInput","name":"cCaseNum","value":"77"},{"dataType":"GPString","direction":"esriGPParameterDirectionInput","name":"dComments","value":"-162.43153 33.527056"},{"dataType":"GPDouble","direction":"esriGPParameterDirectionInput","name":"eSHAPE@X","value":-162.43153},{"dataType":"GPDouble","direction":"esriGPParameterDirectionInput","name":"fSHAPE@Y","value":33.527056},{"dataType":"GPString","direction":"esriGPParameterDirectionInput","name":"gSHAPE@XY","value":"(-115.3252,50.65654)"},{"dataType":"GPString","direction":"esriGPParameterDirectionInput","name":"hclassification","value":"Boating"}],"returnM":false,"returnZ":false},"url":"https://xx.gov/arcgis/rest/services/Tools/InsertCursor/GPServer/InsertCursor/submitJob"},"jobType":"geoprocessingJob","status":"notStarted"},"unknownJson":{},"unsupportedJson":{},"jobType":4,"messages":{},"serverJobId":"","progress":0,"jobStatus":0,"error":null,"credential":{"objectName":"","objectType":"Credential","error":null,"objects":{},"username":"","password":"","authenticationType":0,"referer":"","token":"","tokenExpiry":null,"tokenServiceUrl":"","oAuthClientInfo":null,"oAuthAuthorizationCode":"","oAuthRefreshToken":"","pkcs12Info":null,"sslRequired":false,"authenticatingHost":"","objects":{}},"requestConfiguration":{"objectName":"","objectType":"RequestConfiguration","error":null,"objects":{},"timeoutInterval":60,"maxNumberOfAttempts":5,"forcePost":false,"issueAuthenticationChallenge":true,"userHeaders":{}},"url":"","checkStatusTaskStatus":0,"objects":{},"result":null,"parameters":{"objectName":"","objectType":"GeoprocessingParameters","error":null,"objects":{},"executionType":0,"inputs":{"aItem":{"objectName":"","objectType":"GeoprocessingString","error":null,"objects":{},"parameterType":9,"value":"shooter"},"bPublicPrivate":{"objectName":"","objectType":"GeoprocessingString","error":null,"objects":{},"parameterType":9,"value":"public"},"cCaseNum":{"objectName":"","objectType":"GeoprocessingString","error":null,"objects":{},"parameterType":9,"value":"77"},"dComments":{"objectName":"","objectType":"GeoprocessingString","error":null,"objects":{},"parameterType":9,"value":"-162.43153 33.527056"},"eSHAPE@X":{"objectName":"","objectType":"GeoprocessingDouble","error":null,"objects":{},"parameterType":3,"value":-162.43153},"fSHAPE@Y":{"objectName":"","objectType":"GeoprocessingDouble","error":null,"objects":{},"parameterType":3,"value":33.527056},"gSHAPE@XY":{"objectName":"","objectType":"GeoprocessingString","error":null,"objects":{},"parameterType":9,"value":"(-115.3252,50.65654)"},"hclassification":{"objectName":"","objectType":"GeoprocessingString","error":null,"objects":{},"parameterType":9,"value":"Boating"}},"outputSpatialReference":null,"processSpatialReference":null,"returnM":false,"returnZ":false}}
Jay,
Maybe I am missing something, but I don't see "outputSpatialReference" as one of the properties of GeoprocessingParameter object, see this doc GeoprocessingParameter QML Type | ArcGIS for Developers
This could be the issue.
Including ArcGIS Runtime SDK for Qt to see anyone in this group know the answer to this question, how to set outputSpatialReference in GeoprocessingTask.
Thank you,
Erwin
Yea I am confused...but it displays as a property in my last post in red...this is what I get from a console.log of the GP Processing object