Select to view content in your preferred language

How to show a splash screen/disclaimer window while map is gray?

1613
5
12-16-2020 11:26 AM
AlexRocco
Occasional Contributor

Please see attached. When my web appbuilder project loads, first it shows the blue screen with waiting bars, then the screen is gray for more than several seconds until the basemap shows.

Now, my boss wants to add a splash/disclaimer box while the screen is gray(like attached screen 2). 

What event listener should I be looking at? Thank yoU!1.jpg2.jpg

0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Emeritus

Alex,

   The Splash Screen is a Widget to in the lifecycle of the WAB app the widgetmanger and then individual widgets have to be loaded and all that happens after the Map because many widgets are dependent on the map. So short answer is that's not possible.

0 Kudos
AlexRocco
Occasional Contributor

Hi Robert

Thank you for the reply. So I will not try the Splash widget.  Is there an event listener that I can work on to display "Map Loading..." before Basemap shows up?  Thank you

0 Kudos
AlexRocco
Occasional Contributor

Robert, I am going to try your Map Progress Indicator Widget .  Thank you

https://community.esri.com/t5/web-appbuilder-custom-widgets/map-progress-indicator-widget-version-2-...

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Alex,

   The Map Progress Widget is still a widget thus should have the same issue mentioned earlier. The only way to achieve what you are after is to do custom coding in one of the manger.js files to show so loading or what ever div that you would add to the main dom for the app.

0 Kudos
shaylavi
Esri Contributor

There's a splash screen widget/option in WAB, which I believe you're aware of.. to allow such behaviour before the application even loaded, you need to locate the piece of code where the app loads and inject some good amount of code into there (build a div, stretch it, make it transparent, add a message, etc..).

It is possible but will take some time to locate the right location when the app starts (blue/grey screen). You can then publish an event listener  (see dojo publish & subscribe) and trigger it with a widget when the app is fully loaded.. it's a lot of effort if you don't have previous experience with this type of workflows and on top of all, the maintenance would be really bad since this code is injected and requires manual maintenance when it comes to version updates and such.

 

Shay

 

Shay
0 Kudos