package com.sdoward.rxgooglemaps;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.util.Log;

import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.CameraPosition;
import com.sdoward.rxgooglemap.MapObservableProvider;

import rx.functions.Action1;

public class MapsActivity extends FragmentActivity {

    private SupportMapFragment mapFragment;
    private MapObservableProvider mapObservableProvider;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_maps);
        mapFragment = (SupportMapFragment) getSupportFragmentManager()
                .findFragmentById(R.id.map);
        mapObservableProvider = new MapObservableProvider(mapFragment);
        mapObservableProvider.getCameraChangeObservable().subscribe(new Action1<CameraPosition>() {
            @Override
            public void call(CameraPosition cameraPosition) {
                Log.d(MapsActivity.class.getName(), "camera position");
            }
        });
    }

}

@@ -163,34 +163,17 @@
 ms.maps.
-SupportMapFragment
+*
 ;%0Aimport
@@ -207,30 +207,17 @@
 s.model.
-CameraPosition
+*
 ;%0Aimport
@@ -293,16 +293,43 @@
 Action1;
+%0Aimport rx.subscriptions.*;
 %0A%0Apublic
@@ -476,16 +476,88 @@
 rovider;
+%0A    private CompositeSubscription subscriptions = Subscriptions.from();
 %0A%0A    @O
@@ -901,32 +901,1040 @@
 gment);%0A        
+subscriptions.add(mapObservableProvider.getMapReadyObservable()%0A                .subscribe(new Action1%3CGoogleMap%3E() %7B%0A                    @Override%0A                    public void call(GoogleMap googleMap) %7B%0A                        Log.d(MapsActivity.class.getName(), %22map ready%22);%0A                    %7D%0A                %7D));%0A        subscriptions.add(mapObservableProvider.getMapLongClickObservable()%0A                .subscribe(new Action1%3CLatLng%3E() %7B%0A                    @Override%0A                    public void call(LatLng latLng) %7B%0A                        Log.d(MapsActivity.class.getName(), %22map long click%22);%0A                    %7D%0A                %7D));%0A        subscriptions.add(mapObservableProvider.getMapClickObservable()%0A                .subscribe(new Action1%3CLatLng%3E() %7B%0A                    @Override%0A                    public void call(LatLng latLng) %7B%0A                        Log.d(MapsActivity.class.getName(), %22map click%22);%0A                    %7D%0A                %7D));%0A        subscriptions.add(
 mapObservablePro
@@ -2161,16 +2161,24 @@
 position
+ changed
 %22);%0A    
@@ -2197,16 +2197,17 @@
       %7D)
+)
 ;%0A    %7D%0A
@@ -2207,10 +2207,127 @@
 %0A    %7D%0A%0A
+    @Override%0A    protected void onDestroy() %7B%0A        super.onDestroy();%0A        subscriptions.unsubscribe();%0A    %7D%0A
 %7D%0A

Update example