HI,
My setup -
My Problem.
I have made sure my legend isnt enabled for my graphic layer. i cant understand why the legend is refreshing for all my layers.
I have also tried the Sketch widget. It has the same lag.
Is there a way to disable that?
My Code
The following is in view.when:
var layerList = new LayerList({
view: view,
listItemCreatedFunction: defineActions
});
function defineActions(event) {
var item = event.item;
item.panel = {
content: "legend",
open: false
};
}
here is where i tested the sketch widget that has the same lag
var sketch = new Sketch({
layer: tmp_Cosmetic,
view: view
});
view.ui.add(sketch, "top-right");
tmp_Cosmetic is my graphic layer.
I have observed the same behavior. In my case, the Select tool and the Measure tool, both fire the function declared for 'listItemCreatedFunction'. Also, when the LayerList is created (for the first time), it executes the function declared for 'listItemCreatedFunction' 4 times. This even happens in the example for this feature in the Esri website (LayerList widget with actions | ArcGIS API for JavaScript 4.14 )
Any update on this? I believe I'm having the exact same problem.
Any update on this? I believe the issue is more pronounced in the 4.19 release. I create a legend in the item panel of the layerlist with the list item created function. I have multiple layers in my map and the performance is terrible. As soon as I disable the legend the performance increases. Sketch and measure tools work better too.