I'm having an issue where the map is not rendering in my web app the first time I use it each day. Looking in the debug tools, I can see the MapView container property is null, and the width and height properties are 0. There are no errors in the console. Once I refresh the page, everything renders fine and the properties are set properly. I'm currently using 4.15.
I'm thinking this may be related to either the dom not being fully loaded when the view is created, or some type of caching issue. I know with 3.x there were domReady modules that needed to be included in certain situations. Is the necessary in 4.x?
Any ideas of what would be helpful. Thanks.
Do you know if it would help to load the script that initializes the map at the end of the body, instead of in the header? Other than that I'll just try listening for dom loaded events and initialize the map from there. Thanks.
> Do you know if it would help to load the script that initializes the map at the end of the body, instead of in the header?
My hunch is that using onLoad or one of the webform's lifecycle steps will be the trick to get the DOM timing right.