Code example for GoogleMap

Methods: setInfoWindowAdaptersetMapTypesetMyLocationEnabled

0
		super.onResume(); 
		baseFragment.onResume();
		 
		setUpMap(); 
		if (map != null) {
			map.setMyLocationEnabled(LocalizationManager.get().isLocalizationEnabled());
		} 
	} 
	 
	protected abstract InfoWindowAdapter getInfoWindowAdapter();
	 
	protected abstract void onMapSetup(); 
	 
	protected abstract void onMapSetupFinished(); 
	 
	private void setUpMap() { 
		// Do a null check to confirm that we have not already instantiated the map. 
		if (map == null) {
			// Try to obtain the map from the SupportMapFragment. 
			map = getMap();
			// Check if we were successful in obtaining the map. 
			if (map != null) {
				map.setMyLocationEnabled(LocalizationManager.get().isLocalizationEnabled());
				// Setting an info window adapter allows us to change the both the contents and look of the 
				// info window. 
				map.setInfoWindowAdapter(getInfoWindowAdapter());
				map.setMapType(GoogleMap.MAP_TYPE_NORMAL);
				 
				onMapSetup(); 
				 
				// Pan to see all markers in view. Cannot zoom to bounds until the map has a size. 
				final View mapView = getView();
Contextual code suggestions in your IDE  Get Codota for Java