var templateLayers = arrayUtils.map(evt.layers, function(result){ return result.layer;
Found the answer after a couple more looks at it.
I pulled the
var templateLayers = arrayUtils.map(evt.layers, function(result){
return result.layer;
out completely. and changed
featureLayers: templateLayers,
to
featureLayers: [layer,layer2,layer3]
Tim's filter worked, but I was running too many layers(my best guess) and it was causing a timeout.
Cheers.
var templateLayers = arrayUtils.filter(evt.layers, function(result){ return result.layer.id == "id of layer you want"; });
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.