Maybe I am missing something here, but I am not able to use the new Maps only dependency in Play Services 6.5
I get the following exception:
java.la
Interim solution
replace the xml map fragment with a FrameLayout container
Create the fragment in code and replace the container
SupportMapFragment supportMapFragment = SupportMapFragment.newInstance();
getSupportFragmentManager().beginTransaction().replace(R.id.map_container,supportMapFragment).commit();
//this you should do anyway
supportMapFragment.getMapAsync(new OnMapReadyCallback() {
@Override
public void onMapReady(GoogleMap googleMap) {
//setup map - optional
UiSettings settings = googleMap.getUiSettings();
settings.setCompassEnabled(false);
settings.setZoomControlsEnabled(false);
settings.setAllGesturesEnabled(true);
settings.setMyLocationButtonEnabled(true);
}
});
Please note that the above was done in 'onCreate' in an activity without any other fragments, so make sure you adapt the transaction to your lifecycle and logic.