So im currently making an GoogleMaps based game. Because i wanted to make an camera, i need the size of the whole google map in pixel.
Heres what i mean :
I already tried :
// pre generated by android studios
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
int width = mapFragment.getView().getMeasuredWidth();
int height = mapFragment.getView().getMeasuredHeight();
String widthAndHeight = width+" "+height;
But it only returns null. Whats wrong with the snippet? Any other ways to calculate the full size of the google map ? Or does this just returns the size of the part of the map, which is currently displayed ?