Multipoint Identify only returning a single point

1032
3
10-01-2012 08:37 AM
WyattPearsall
New Contributor II
Code written as follows:

       
var eT=esri.tasks,idTask,idParam, runIT;
        idTask= new eT.IdentifyTask("http://example/myMyServer");
        idParam= new eT.IdentifyParameters();
 idParam.layerOption=eT.IdentifyParameters.LAYER_OPTION_VISIBLE;
 idParam.layerIds=[0,1,2,3,4,5,6,7,8,9,10];
 idParam.tolerance=1;
 idParam.mapExtent=map.extent;
 runIT=makeIT(idTask,idParam);

function makeIT(tsk,param){
        return function (e){
                param.height = map.height;
         param.width  = map.width;
         param.geometryType="esriGeometryMultipoint";
         param.geometry=e;
                return tsk.execute(param);
        }
}
...
var def=runIT(myMultipoint);

(The closure structure is to allow passing static parameters upon creation of the identify task)

Single point identify operations work with this code, but multipoint operations only return a single point.
(returnGeometry doesn't fix this).

The service identified against is a DynamicMapService containing rasters from which I intend to identify pixel values.
0 Kudos
3 Replies
__Rich_
Occasional Contributor III
This won't answer the question but...

...here is (hopefully) a simple test case to recreate:

Identify Point (returns 2 features)

Identify Multipoint (returns 1 feature)

The only difference between the two is the geometry type, all values, including the geometry values are the same.
0 Kudos
WyattPearsall
New Contributor II
The trouble is mostly that I want the Identify to return either an array of point result objects,
one for each point of the multipoint, or a multipoint results object. What happens instead is I
get a response only for the first point of the multipoint.

Identify operations with geometries other than Point aren't especially well-documented,
nor is the constrains on the response from the Server REST API.

Perhaps next I will try to include multiple point queries in the same request? (though that
is not likely to work).

I have been working around this problem by making many requests and processing them once
all the deferreds resolve.. however, this results in far more overhead than simply making one,
more complex request. Seems there should be a more efficient way, though it likely requires some
back-end tinkering.
0 Kudos
__Rich_
Occasional Contributor III
Based on what I found using the REST input form, I think this is a question for the REST API team rather than the JS API people i.e. it appears to be a server-side issue.
0 Kudos