Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Java Google Maps, need to check if map is loaded fully before executing dialog

I'm trying to figure out if the map is loaded before I open a dialog on the MainActivity (with map fragment) it would be helpful if there was a

if(map.isLoaded()){
    //show dialog
} 

if I just normally open a dialog after the map is already loaded, then it opens fine, but I'm switching activities and I wanted the dialog to open as soon as the activity starts but it seems as if the dialog is beating the loading map, then through the process of it loading, the dialog goes away and the map comes up. I've seen things about javascript and theres something regarding tilesLoaded() but I'm not seeing anything like that either. Any suggestions??

like image 450
jp093121 Avatar asked Sep 16 '25 11:09

jp093121


1 Answers

How about GoogleMap.OnMapLoadedCallback?

like image 125
MaciejGórski Avatar answered Sep 18 '25 10:09

MaciejGórski