Code example for GoogleMap

Methods: clear, getCameraPosition

0
		RedrawLines(); 
	} 
 
	public void CleanMap() { 
		markers = new ArrayList<Marker>();
		map.clear();
		addDefaultMarkersToMap(); 
	} 
 
	public void RemoveMarker(int position) {
		markers.get(position).remove();
		markers.remove(position);
	} 
 
	void addDefaultMarkersToMap() { 
		LatLng mapCenter = map.getCameraPosition().target;
		HomeMarker = map.addMarker(new MarkerOptions().position(mapCenter).title("Home").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)).draggable(true));
		PositionHoldMarker = map.addMarker(new MarkerOptions().position(mapCenter).title("PositionHold").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));
		CurrentWPCircle = map.addCircle(new CircleOptions().center(mapCenter).radius(distanceWhenWPReached).fillColor(Color.argb(50, 0, 255, 50)));
		CurrentWPCircle.setStrokeWidth(2);
	}