Can some one tell me whats wrong here. The geoprocessing job always fails and i don't see much info in firebug to debug. This is my code to generate the feature set.
var inputFeature = { displayFieldName: "", hasM: true, hasZ: true, geometryType: "esriGeometryPolyline", spatialReference: { wkid: 3460, latestWkid: 3460 }, fields: [ { name: "OBJECTID", type: "esriFieldTypeOID", alias: "OBJECTID" }, { name: "RoadID", type: "esriFieldTypeString", alias: "RoadID", length: 10 }, { name: "Shape_Length", type: "esriFieldTypeDouble", alias: "Shape_Length" } ], features: [{ geometry: geom,//poly line geometry returned from a query task attributes: { OBJECTID: 1, RoadID: $('#RoadIdTextBox').val(), Shape_Length: 0.00 } }], exceededTransferLimit: false } var searchRadius = { distance: $('#SearchRadius').val() / 1, units: "esriMeters" } var IRIParams = { "Input_Route_Features": inputFeature, "Search_Radius": searchRadius }; console.log(dojo.toJson(inputFeature)); gp.submitJob(IRIParams); gp.on("status-update", function (e) { console.log(e); });` This is the output when i console.log() inputFeature
{ "displayFieldName": "", "hasM": true, "hasZ": true, "geometryType": "esriGeometryPolyline", "spatialReference": { "wkid": 3460, "latestWkid": 3460 }, "fields": [{ "name": "OBJECTID", "type": "esriFieldTypeOID", "alias": "OBJECTID" }, { "name": "RoadID", "type": "esriFieldTypeString", "alias": "RoadID", "length": 10 }, { "name": "Shape_Length", "type": "esriFieldTypeDouble", "alias": "Shape_Length" }], "features": [{ "geometry": { "type": "polyline", "paths": [[[1966832.8483635725, 3875011.726536308, 0, 1189], [1966841.088767071, 3875017.3918245276, 0, 1199]]], "_path": 0, "hasZ": true, "hasM": true, "spatialReference": { "wkid": 3460 } }, "attributes": { "OBJECTID": 1, "RoadID": "10239011", "Shape_Length": 0 } }], "exceededTransferLimit": false } It even fails when i paste and run the output in the services directory interface.
أكثر...
var inputFeature = { displayFieldName: "", hasM: true, hasZ: true, geometryType: "esriGeometryPolyline", spatialReference: { wkid: 3460, latestWkid: 3460 }, fields: [ { name: "OBJECTID", type: "esriFieldTypeOID", alias: "OBJECTID" }, { name: "RoadID", type: "esriFieldTypeString", alias: "RoadID", length: 10 }, { name: "Shape_Length", type: "esriFieldTypeDouble", alias: "Shape_Length" } ], features: [{ geometry: geom,//poly line geometry returned from a query task attributes: { OBJECTID: 1, RoadID: $('#RoadIdTextBox').val(), Shape_Length: 0.00 } }], exceededTransferLimit: false } var searchRadius = { distance: $('#SearchRadius').val() / 1, units: "esriMeters" } var IRIParams = { "Input_Route_Features": inputFeature, "Search_Radius": searchRadius }; console.log(dojo.toJson(inputFeature)); gp.submitJob(IRIParams); gp.on("status-update", function (e) { console.log(e); });` This is the output when i console.log() inputFeature
{ "displayFieldName": "", "hasM": true, "hasZ": true, "geometryType": "esriGeometryPolyline", "spatialReference": { "wkid": 3460, "latestWkid": 3460 }, "fields": [{ "name": "OBJECTID", "type": "esriFieldTypeOID", "alias": "OBJECTID" }, { "name": "RoadID", "type": "esriFieldTypeString", "alias": "RoadID", "length": 10 }, { "name": "Shape_Length", "type": "esriFieldTypeDouble", "alias": "Shape_Length" }], "features": [{ "geometry": { "type": "polyline", "paths": [[[1966832.8483635725, 3875011.726536308, 0, 1189], [1966841.088767071, 3875017.3918245276, 0, 1199]]], "_path": 0, "hasZ": true, "hasM": true, "spatialReference": { "wkid": 3460 } }, "attributes": { "OBJECTID": 1, "RoadID": "10239011", "Shape_Length": 0 } }], "exceededTransferLimit": false } It even fails when i paste and run the output in the services directory interface.
أكثر...