Yes but you have to specify the URL and then choose layers...is it a way that you click on map, get all the visible layers and then use all those layers to do the identify?
This way i can write a function where i can pass all the visible layers at map click and then iterate through each layer and get results...
thanks
Unfortunately you have to do it programmatically. There are advantages and disadvantages to this. Disadvantage - you have to write itAdvantage - you can identify non -visible layers. Basically you have to take an evt/mappoint and loop through all the map layers and do an identify on each. loosely:
var ids = map.layerIds;
dojo.forEach(ids, function(id) {
var layer = this.map.getLayer(id);
if (layer.visible==true){
//do identify on layer.url
}
}