I'm using the Google Maps Android API and I'm creating a Map programmatically. However, I can't seem to figure out how to change the layout_height, layout_width, and layout_margin.
I'm looking at the official guide, which says to use GoogleMapOptions, which should give me all the same options as those available via XML.
Here's my code.
GoogleMapOptions options = new GoogleMapOptions();
options
.compassEnabled(false)
.mapToolbarEnabled(false)
.rotateGesturesEnabled(false)
.scrollGesturesEnabled(false)
.tiltGesturesEnabled(false)
.zoomControlsEnabled(false)
.zoomGesturesEnabled(false);
MapFragment mMapFragment = MapFragment.newInstance(options);
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
fragmentTransaction.add(R.id.mapMenu, mMapFragment);
fragmentTransaction.commit();