I want to add map inside fragment with custom layout.
- I can do it using ChildFragmentManager that will add SupportMapFragment. This approach im currently using. However it has disadvantage because child fragment transaction is asynchronous and its hard to guarantee that getMap won't return null.
- Another way is to extend SupportMapFragment store mapView from super
onCreateView
mapView = super.onCreateView(inflater, container, savedInstanceState);
and insert it to inflated layout. Primary problem is that then fragment try to restore from saved state Google Maps SDK crushes internally.
Is there any other way to solve this problem. It would be great if somebody from Google Map team will recommend right approach because you haven't included anything like this to samples.