Code example for Marker

Methods: equals

0
			@Override 
			public boolean onMarkerClick(Marker marker) {
				// TODO Auto-generated method stub 
				alert.setTitle("Want to travel?"); 
				 
				if(marker.equals(uscTc)){ 
					alert.setMessage("Do you want to go to USC-Main Campus?") 
					.setPositiveButton("Sure",new DialogInterface.OnClickListener() { 
						public void onClick(DialogInterface dialog,int id) { 
							// Animate to usc main 
							map.animateCamera(CameraUpdateFactory.newLatLngZoom(MAIN, map.getMaxZoomLevel())); 
						} 
					  }) 
					.setNegativeButton("No Thanks",new DialogInterface.OnClickListener() { 
						public void onClick(DialogInterface dialog,int id) {} 
					}); 
				} else if(marker.equals(uscMain)){ 
					alert.setMessage("Do you want to go to Ayala Center Cebu?") 
					.setPositiveButton("Sure",new DialogInterface.OnClickListener() { 
						public void onClick(DialogInterface dialog,int id) {
							// Animate to usc main 
							map.animateCamera(CameraUpdateFactory.newLatLngZoom(AYALA, map.getMaxZoomLevel()));
						} 
					  }) 
					.setNegativeButton("No Thanks",new DialogInterface.OnClickListener() {
						public void onClick(DialogInterface dialog,int id) {}
					}); 
					 
				}else if(marker.equals(ayalaCebu)){ 
					alert.setMessage("Do you want to go to USC-TC Campus?") 
					.setPositiveButton("Sure",new DialogInterface.OnClickListener() {
						public void onClick(DialogInterface dialog,int id) {
							// Animate to usc main 
							map.animateCamera(CameraUpdateFactory.newLatLngZoom(TC, map.getMaxZoomLevel()));