Code example for GoogleMap

Methods: addCircle, addMarker, clear, setOnMarkerDragListener

0
 
			coRadius.radius(size);
		} 
		coRadius.fillColor(0x110000FF);
		coRadius.strokeColor(0xFF0000FF);
		Circle circle = mMap.addCircle(coRadius);
	} 
public void drawMarker(LatLng location)
{ 
MarkerOptions moMarker = new MarkerOptions();
moMarker.position(location);
moMarker.title("Melamed is gay");
moMarker.snippet("Melamed is gay");
moMarker.icon(BitmapDescriptorFactory
		.defaultMarker(BitmapDescriptorFactory.HUE_AZURE));
moMarker.draggable(true);
mMap.addMarker(moMarker);
mMap.setOnMarkerDragListener(new myOnMArkerDragListener());
} 
public void drawPOI(int size,LatLng location)
{ 
	drawMarker(location);
	drawRadius(size, location);
	mUiSettings.setAllGesturesEnabled(false);
} 
class myOnFocusChangeListener implements OnFocusChangeListener {
 
		@Override 
		public void onFocusChange(View v, boolean hasFocus) {
			// TODO Auto-generated method stub 
			if (etRadius.getText().length() > 0) {
				//drawRadius(Integer.parseInt(etRadius.getText().toString())); 
			} 
		} 
 
	} 
class myOnMapClickListener implements OnMapClickListener {
 
	@Override 
	public void onMapClick(LatLng center) {
		mMap.clear();
		int radius =10;
		if (etRadius.getText().length() > 0) {
			radius = Integer.parseInt(etRadius.getText().toString());
		} 
		drawPOI(radius,center);
		 
	} 
	 
	 
	 
	} 
class myOnMArkerDragListener implements OnMarkerDragListener
{ 
 
	@Override 
	public void onMarkerDrag(Marker marker) {
		LatLng newPos = marker.getPosition();
		 to = new Location(provider);
			to.setLatitude(newPos.latitude);
			to.setLongitude(newPos.longitude);
		 
		mMap.clear();
		int radius =(int) from.distanceTo(to);//calculateDistance(markerCenter,newPos);
		drawPOI(radius, markerCenter);
		 
	} 
	public int calculateDistance(LatLng from,LatLng to) {