Code example for LatLngBounds

Methods: contains

0
     
     
    @Override 
    public void onCameraChange(CameraPosition position){
    	Vibrator outOfBoundsVb = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
    	if(!sicomMapBounds.contains(new LatLng(position.target.latitude, 
    			position.target.longitude)) || position.zoom < minZoom){
    			outOfBoundsVb.vibrate(500); //it vibrates for two secs when going out 
    											//of bounds 
    			sicomMap.animateCamera(CameraUpdateFactory.newLatLngZoom(UniEafit, minZoom));
    			//it returns to UniEafit when going out of bounds 
    	} 
    	 
    } 
    
     
    @Override 
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present. 
        getMenuInflater().inflate(R.menu.main, menu);
        return true;