Code example for GoogleMap

Methods: setMapType, setMyLocationEnabled, setTrafficEnabled

0
        } else return true; 
	} 
	 
	private void setMapOptions() { 
 
		googleMap.setMyLocationEnabled(true);
        googleMap.setTrafficEnabled(true);
        googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
         
	} 
	 
    @Override 
    protected void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
 
        // save the map type so when we change orientation, the map type can be restored 
        cameraLatLng = googleMap.getCameraPosition().target;
        cameraZoom = googleMap.getCameraPosition().zoom;
        outState.putDouble("lat", cameraLatLng.latitude);
        outState.putDouble("lng", cameraLatLng.longitude);
        outState.putFloat("zoom", cameraZoom);