I have developed a geoprocessing service as below.
I'm then consuming it in web app builder with following code:
Akshay,
You have:
this.geometryService.project(params1, lang.hitch(this, function (projectedPoints) {
So the results of the project are called projectedPoints but you are latter in your code using:
var clickPointGraphic = new Graphic(result.features["0"].geometry, lineSymbolQuery);
I am not sure where result.features["0"].geometry is coming from in your code...
Hi Robert,
I was trying with another coordinate system but anyway it doesn't have any impact on the result. I still get 0 features as result.
and result.features[0].geometry is my result which I getting from fetching route data using query. I'm passing this to my GP service for the Parameter value.
Akshay,
So is the input geometry a point or a polyline? When it works in ArcMap what is the spatial reference of the input geometry? I don't like helping on GP widget stuff because people normally say it works in ArcMap but not in X. Well there are many things that would possibly prevent it from working in Xand yet work in ArcMap just fine. There is the whole scratch workspace thing and several others. But is could just be that you are just not getting the input param correct.
Hi Robert,
I understand the pain. Sorry for that name confusion. It is a polyline.
Secondly, I have just one param which is a result set for that I'm simply passing my result from a query as mentioned above and spatial reference is the same as my data, so I don't see a problem there.
Akshay,
So I don't see the issue either then. Does the GP create a featureclass or anything server side? Have you checked the server logs for clues as to what is going wrong?
It returns a table and a feature class. No warnings or issues in the logs. I'd checked that.
Did you change the server log to verbose or detailed?