Code example for GoogleMap

Methods: moveCamera, setOnCameraChangeListener

0
	    		    .add(ne, nw, sw, se) // 4 corners, ccw
	    		    .strokeWidth(5)
	    		    .strokeColor(Color.GREEN)
	    		    .fillColor(0x6600ff00));
                 
                // One time fix to set the camera when the map is done loading 
                map.setOnCameraChangeListener(new OnCameraChangeListener() {
 
                    @Override 
                    public void onCameraChange(CameraPosition arg0) {
                        // Move camera. 
                        map.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, 10));
                        // Remove listener to prevent position reset on camera move. 
                        map.setOnCameraChangeListener(null);
                    } 
                }); 
            } 
        } 
    } 
     
    @Override