Code example for GoogleMapOptions

Methods: compassEnabled, mapType, rotateGesturesEnabled, tiltGesturesEnabled

0
	 
	// method for creating and returing a google map options object 
	// for passing into the 'setFragmentOptions' method 
	public static GoogleMapOptions createOptions(boolean hasCompass, boolean canRotate, boolean canTilt, int mapType)
	{  
		GoogleMapOptions options = new GoogleMapOptions();
		 
		// set the map options parameters from the passed in arguments 
			options.compassEnabled(hasCompass);
			options.rotateGesturesEnabled(canRotate);
			options.tiltGesturesEnabled(canTilt);
			options.mapType(mapType);
			 
		return options;
	} 
	 
	// method for setting the map fragment initial options 
	public static MapFragment setFragmentOptions(GoogleMapOptions options)
	{ 
		// creates a new map fragment with the passed in google map options object 
		MapFragment mapFragment = MapFragment.newInstance(options);