OnMapReadyCallback not transmitted to parent fragment in nested multipane layout using Navhost

28 Views Asked by At

I have Navhost which contains photo fragment and map fragment. Map fragment is working when I use it alone, but when I try to integrate it in parent fragment I can scroll map but I cannot use any marks and other my custom options.

I do not want to re-implement map functionality inside parent fragment as it should work out of the box. All ideas are appreciated.

To be on the same page I would maybe rephrase my question. If I take official example how can I make several maps on the screen simultaneously inside wrapping fragment with correctly working touch events and ability to replace them and share data dynamically? (Official google maps example https://codelabs.developers.google.com/codelabs/maps-platform-101-android/#0 )

1

There are 1 best solutions below

0
On

My mistake was simply using original SupportMapFragment while I had to use my own fragment which implements OnMapReadyCallback and inflates layout containing SupportMapFragment.

(Could not solve it for a week and solved right after posting a question.)