I am trying to get attributes from multiple layers on a map click, using OpenLayers 3 and layers served from Geoserver.
I found this snippet but it is using an older version of Open Layers, I haven't found anything that works the same way with Open Layers 3
http://dev.openlayers.org/examples/getfeatureinfo-popup.html
this seems to work..simple variation of the first answer - this will retrieve and display attributes from multiple layers and from multiple features in each layer, if there are overlapping features