I have some maps when I move between the maps I want to use the layers in the map but the program falls
Because the map has not yet been initialized
How can I make the program wait for the map initialize and only then use the layers