Hi folks,
I am selecting features from all layers on my map and now i want to highlight all selected features. I do it using this code:
let highlight;
map.allLayers.forEach(layer => {
// Query all layers data
if (layer.type === "feature" && layer.visible){
layer.queryFeatures(query)
.then((results) => {
const graphics = results.features;
// console.log(graphics);
// do something with query results
highlight = highlight(graphics);
})
}
});
But i get error: Uncaught (in promise) TypeError: highlight is not a function;
How can i simply achive this?
Thanks