Code example for MapFragment

Methods: getMap

0
//		SupportMapFragment mapFragment = new SupportMapFragment(); 
		 
		mMapFragment = new MapFragment() {
			public void onActivityCreated(Bundle savedInstanceState) {
				super.onActivityCreated(savedInstanceState);
				mMap = mMapFragment.getMap();
				if(mMap != null) {
					mMap.setMyLocationEnabled(true);
					mMap.setOnMapClickListener(new OnMapClickListener() {
						 
						@Override 
						public void onMapClick(LatLng location) {
							addMarker(location);
							 
						} 
					}); 
				} 
			}; 
		}; 
		getChildFragmentManager().beginTransaction().replace(R.id.SDNAMapViewFrameLayout, mMapFragment).commit();
		return v;