I am using fragments in my application and I am new for this. There is a fragment in which I want to display Google Map and want to get its object, for this I have a fragment in
Revised code:
Your xml file-
Your java file (only relevant code)-
View view = null, mapView = null;
private GoogleMap mMap;
view = inflater.inflate(R.layout.findmycar, container,false);
FragmentManager fragmentManager = getActivity().getSupportFragmentManager();
SupportMapFragment supportMapFragment = (SupportMapFragment) fragmentManager
.findFragmentById(R.id.map);
mMap = supportMapFragment.getMap();
mapView = (View) view.findViewById(R.id.map);