Widget has a strange behaviour? 4.18

312
0
06-25-2021 04:53 AM
MartijnHoogstraten
New Contributor II

Dear community,

We are using Angular as a framework for our entire application. On a page we load "esri/Map", where we have added a "esri/widgets/Widget", this widget is a confirm popup with a property called "message".
When we click on something inside the map the popup appears with the correct message and we then click it away. But when we move away from the page and come back and click in the map again, we get a strange behaviour. The render get called twice, the first time with the correct message and the second time message is undefined. What could be the problem?

I have tryed to properly destroy the widget and the map by doing the following:

public destroy () {
this.confirmWidget.destroy();
this.mapview.destroy();
this.map.layers.removeAll();
this.map.tables.removeAll();
this.map.basemap = null;
this.map.ground = null;
this.map.destroy();
super.destroy();
}

  Then the beviour changes, it wont appear the second time but it will the third time?

0 Kudos
0 Replies