I've seen some topics some months ago, about the fact that using (Google)MapView inside a Fragment was a bit tricky/impossible. I would like to know if atm (June) there is a workaround ? My application (Android 3.0) is essentially working with the Fragment system and I need to display a map in one of these fragments.
Currently I only know of one solution. I stumbled across this when I ran into the same problem. https://github.com/petedoyle/android-support-v4-googlemaps.
EDIT
Here is a newer fork based off r9 https://github.com/rfc1459/android-support-v4-googlemaps
You can build it via eclipse or download a compiled version here https://github.com/rickbarrette/android-support-v4-googlemaps/downloads
There is another question already. Basically the workaround is to create an Activity manager and a TabHost and create a single tab containing a MapActivity. In this way you can load a separate MapActivity inside a Fragment.
For more information see the sample project provided by the original answerer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With