layerList.on("click",function(event) {
var aa="asdas";
});
view.when(function() {
// Event listener that fires each time an action is triggered
//layerList.on("click", function(event) {
// contentLegend=layer;
//});
// Create the LayerList widget with the associated actions
// and add it to the top-right corner of the view.
// This function will execute once the promise is resolved
contentGroupLayerFeature.when(function() {
contentGroupLayerFeature.on("trigger-action", function(event) {
var aa="asdas";
});
});
contentGroupLayerFeature.on("click", function(event) {
var aa="asdas";
});
console.log("webmap loaded successfully");
}, function(error){
// Use the errback function to handle when the view doesn't load properly
console.log("The view's resources failed to load: ", error);
});