IdentifyTask doesn't return results in ArcGIS Server 10.4

686
2
08-22-2017 06:33 AM
GianniContino
New Contributor III

Hello,

I'm experimenting an issue about IdentifyTask in ArcGIS API for JavaScript 3.18, with ArcGIS Server 10.4 and DB Oracle 12c (with SDE ST_GEOMETRY).

Every request I make I'm not able to get results: 

{"results":[]}

both when I make the request from my WebApp, and if I fill the form in ArcGIS REST services interface.

The code is simple and in old version (Server 10.2.2, Oracle 12c, ArcGIS JSAPI 3.14 it worked well.

[...]

idTask = new esri.tasks.IdentifyTask(layerUrl);
identifyParams = new esri.tasks.IdentifyParameters();
identifyParams.tolerance = 5;
identifyParams.returnGeometry = true;
identifyParams.layerIds = [0, 1];
identifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_ALL;
identifyParams.width = map.width;
identifyParams.width = map.height;
dojo.connect(map, "onClick", execIdTask);
}

function execIdTask(evt) {
var p = evt.mapPoint;
identifyParams.geometry = p;
identifyParams.mapExtent = map.extent;
idTask.execute(identifyParams, function (r) {
handleClick(r)
});
}

Could it be related to something in DB GRANTS to SDE user?

Or something related to new version of AGServer?

Thanks in advance

Gianni

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

Gianni,

   I don't see where you are specifying the identifyParams.spatialReference in your code. Even though your code worked in older versions you should have identifyParams.spatialReference in newer versions.

0 Kudos
PanagiotisPapadopoulos
Esri Regular Contributor

If the the layer you are using is a query layer you need to enable the St_Geometry library on Oracle Server. 

Configure the extproc to access ST_Geometry in Oracle—Help | ArcGIS Desktop