I've got a problem with the google map object in the new v2 API. I'm trying to add methods to show and hide the map object, but I can't seem to get it to work.
For example - I have a class called MyMapFragment which extends the MapFragment class.
I've tried a couple of ways which I've seen posted here, but neither seem to work for me.
Option 1: Inside the MyMapFragment class, I've tried calling:
this.getFragmentManager().beginTransaction().hide(this).commit();
Option 2: I've tried to hide the actual containing view, using something like the following:
getActivity().getWindow().findViewById(CONTENT_VIEW_ID);
v.setVisibility( View.INVISIBLE );
Both of these options hide the UI controls (i.e. the zoom controls) of the map successfully, but the actual map does not get hidden.
Does anyone see what may be wrong with this method of hiding the map fragment?
Help muchly appreciated!