I am identifying features from an ArcGISDynamicMapServiceLayer
All the sublayers can be toggle on/off and when identifying, only the visible layers are queried/returned. Below are the initIdentify and executeIdentifyTask functions.
dojo.connect(map, "onLoad", function(map) {initIdentify(map);});
function initIdentify(map) {
//create identify tasks and setup parameters
identifyTask = new esri.tasks.IdentifyTask("http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");
identifyParams = new esri.tasks.IdentifyParameters();
identifyParams.tolerance = 3;
identifyParams.returnGeometry = true;
identifyParams.layerIds = wmsLayer.visibleLayers;
identifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_ALL;
identifyParams.width = map.width;
identifyParams.height = map.height;
dojo.connect(map, "onClick", executeIdentifyTask);
}
function executeIdentifyTask(evt) {
if (visibleLayers.length === 0){
return;
} else {
identifyParams.geometry = evt.mapPoint;
identifyParams.mapExtent = map.extent;
identifyParams.layerIds = wmsLayer.visibleLayers;
identifyTask.execute(identifyParams, function(idResults) { fillInfoWindow(idResults, evt); });
}
}
When the identify function is run, is there a way to highlight/select those features that are being identified?