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"; });
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.