Hi Robert,
I'm not sure how to do that with a GraphicsLayer. Here's a quick rundown of how I am setting up the identifyTask for my featureLayers. I have my identify Parameters set up like this:
var identifyParams = new IdentifyParameters();
identifyParams.tolerance = 10;
identifyParams.returnGeometry = true;
//identifyParams.geometryPrecision = 1;
//identifyParams.layerIds = [0, 2];
identifyParams.layerOption = IdentifyParameters.LAYER_ALL;
identifyParams.width = map.width;
identifyParams.height = map.height;
I then loop over my featureLayers adding their URLs to an identifyTaskArray:
identifyTaskArr.push(new IdentifyTask(layers.url));
Lastly, I loop over the identifyTaskArray and execute the identifyTasks using the identifyParameters:
for (var j=0;j<identifyTaskArr.length;j++){
var deferred = identifyTaskArr.execute(identifyParams)
.addCallback(function (response) {
var featureArr = [];
for (var k=0;k<response.length;k++)
{
var feature = response.feature;
//construct jsonTitle and jsonCOntent here based on feature attibutes
//setting template content here
var json = {title:jsonTitle ,content: jsonContent};
var testTemplate = new InfoTemplate(json);
feature.setInfoTemplate(testTemplate);
// Add to list
featureArr.push(feature);
}
return featureArr;
});
deferredList.push(deferred);
}
map.infoWindow.setFeature.(deferredList);
map.infoWindow.show(event.mapPoint);
I've never performed an identifyTask on GraphicsLayers. I'm currently using a graphicsLayer on click event to pop up my infowindow(which is sub-optimal). I quess what I'm most confused about is what URL parameter I would use to create my IdentifyTask for my graphicsLayers. I am creating my graphicsLayers on the fly from attributes and coordinates from another database.
Thanks for your help.
Tyler