I have a web app builder application where I have created a widget to switch web maps in the application. The widget has buttons in it and when I click on the buttons a particular web map is needed to be loaded. Everything is working fine as per needs but the main concern is that the newly loaded web map is ordering itself below the existing web map as a res ult of which the the newly loaded web map cannot be seen. Whenever I try to change the web map using my custom widget it gets added successfully but gets added at the bottom instead of being added at the top due to which one cant see the newly added web map.
What I am really looking for is that when I click on my custom widget the currently shown web map should be hidden and a new web map should be loaded.
Any helps or suggestions would be highly appreciated.