dcc.Loading only on first load of dl.Map not when clicked/hover on feature in the map

I had to use dcc.Loading to wrap dl.Map, because when online and the map loads heavy geojson something happen and the page is returned to the previous page.
With dcc.Loading everything is OK, but just partially.
When map is loaded and it has features with defined pop-ups callbacks and I click on the feature, again loading appears, map is refreshing and it doesn’t seem nice.
Is it possible dcc.Loading to be used just on first map loading and not everytime a click is made on it?
Thanks in advance.

Hey @Bezil maybe helpful:

Thanks for the suggestion.
Here I do not have pages, but the control of the Div where the map is is through Buttons.
If using the example shown, it should look like this:

dl.BaseLayer(), dl.Overlay()
dls.Hash(id='loading', show_initially=True, fullscreen=True))


body:has(#_pages_content[data-dash-is-loading="true"]) #loading {
    display: flex !important;

I suppose you control the elements which have _pages_content id, which I do not have here. Instead it is dl.Map.
Any suggestions on this?
Thanks again.

Hello @Bezil,

Have the loading wrapped around another div set to display initially, and then have a callback to triggers to populate some data to it when the Map is loaded completely.