Initial layout cannot display a MAP

I found solution opening a view I desire triggering before Enter event on MainView

btw, the map should be displayed also if you use my code above.
but when you use the map code in MainView it doesn’t work.
MainView can contain only button or icon … ?

@Route(“”)
@ViewController(“MainView”)
@ViewDescriptor(“main-view.xml”)
public class MainView extends StandardMainView {
@Override
public void beforeEnter(BeforeEnterEvent event) {
// Set a specific screen as a default page after login in JMIX 2.0

    // Check if the root path is accessed
    if (event.getLocation().getPath().isEmpty()) {
        // Redirect to the Dashboard route when accessing the root path
        event.forwardTo(DashboardView.class);
    }
}

}