Code example for MapFragment

Methods: getActivitygetMap

	public void initMapIfNeeded() { 
		if (_googleMap == null) {
			// 2 cases now. It's either google play service is unavailable or not really initialized 
			_googleMap = _mapFragment.getMap();
			if (_googleMap == null) {
				// google play service is not available on user's device, we simply return. 
				// activity will call this method in onResume() 
				// then MapFragment will show a label and a button directing user to download google play service 
			try { 
			} catch (GooglePlayServicesNotAvailableException e) {
				Log.e(GoogleMapManager.class.getSimpleName(), e.toString());
Connect your IDE to all the code out there  Get Codota for Java