1

Waiting until the google map has size in a MapFragment

view story
linux-howto

http://stackoverflow.com – My activity contains a MapFragment in a LinearLayout. I do the following in onCreate: I inflate this layout using setContentView in the onCreate method of my activity. Get a handle to the GoogleMap using getMap(). in onStart: I get some place coordinates from an SQLite Database add corresponding markers to the map add these points to a LatLngBounds.Builder animate the camera using newLatLngBounds(Builder.build(), 10) According to maps api reference, I shouldn't call newLatLngBounds(LatLngBounds bounds, int padding) before making sure that the map has a size. I indeed get an IllegalSt (HowTos)