I want to enclose the map within a Fragment. I tried with 2 approaches.
It is throwing IllegalException when I try to call mTabHost.setup(); for setting up my tabs.
Kindly let me know how to go about it.
A MapActivity can load a Fragment that contains a MapView, on API Level 11 and higher -- see this sample project for an example of how this is done.
However, this does not work with the fragment backport in the Android Support package. There is no good way to handle that, unfortunately, at this time.
Google released the Map API Version 2. This gives you a MapFragment and a SupportMapFragment. This allows you to add a Map without extending MapActivity.
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