function gotoPolygonAdminResultOL(coordString,tablename, resultID) {
	// the code to centre the polygon into the middle of the map
	// when the user is in an edit session
	// and to add the click event on the polygon that will call up the edit form

	/* **********************
	CODE REQUIRED HERE 
	********************** */


	// close the info window
	try {
		doCloseInfoWindow();
	}
	catch ( e) {
	}

	
	// parse the coordString to extract the required coordinate information
	// coordString has the format 
	// 0.035791397094727||51.548843675242 0.023946762084961||51.539662493652 0.039224624633789||51.533255921019 0.04918098449707||51.547135688699 0.035791397094727||51.548843675242
	// i.e. the coordinates are separated by || and coordinate pairs separated by a space
	// and the last and first coordinates are the same for a polygon

	
	// centre and zoom the map so that the polygon shows up when it is drawn
	

	// find out the colour for the polygon
	var theColour = getColour(tablename);

	// as this is an edit option, switch all layers off
	switchAllLayersOff();
	
	
	// draw the polygon on the map
	// use variable theAdminPolygon to store the polygon object, so that it can be removed later once the user is not editing any longer
	

	// add a listener to the polygon, so that when the user clicks on it, the edit form will appear:
	// the call for the form is:  showAdminResult(tablename, resultID);





}


function gotoAdminResultOL(lng,lat,tablename, resultID) {
	// zoom the map to this point so that the user can click on it and edit the form data
	// lat and lng give the coordinates of the point
	// the code to centre the point into the middle of the map
	// when the user is in an edit session
	// and to add the click event on the point that will call up the edit form

	/* **********************
	CODE REQUIRED HERE 
	********************** */


	// close the info window
	try {
		doCloseInfoWindow();
	}
	catch ( e) {
	}

	
	// centre and zoom the map so that the point shows up when it is drawn
	

	// find out the icon for the point
	var imagelocation = getCustomIcon(tablename, false); 

	// as this is an edit option, switch all layers off
	switchAllLayersOff();
	
	
	// draw the polygon on the map
	// use variable theAdminPoint to store the polygon object, so that it can be removed later once the user is not editing any longer
	

	// add a listener to the polygon, so that when the user clicks on it, the edit form will appear:
	// the call for the form is:  showAdminResult(tablename, resultID);



}

function gotoLineAdminResultOL(coordString,tablename, resultID) {
	// the code to centre the line into the middle of the map
	// when the user is in an edit session
	// and to add the click event on the line that will call up the edit form

	/* **********************
	CODE REQUIRED HERE 
	********************** */


	// close the info window
	try {
		doCloseInfoWindow();
	}
	catch ( e) {
	}

	
	// parse the coordString to extract the required coordinate information
	// coordString has the format 
	// .048666000366211,51.546601929754 0.038881301879883,51.541050465534 0.029096603393555,51.535925435872 0.02446174621582,51.540196334001
	// i.e. coordinates are separated by , and coordinate pairs by a space 
	
	// centre and zoom the map so that the line shows up when it is drawn
	

	// find out the colour for the line
	var theColour = getColour(tablename);

	// as this is an edit option, switch all layers off
	switchAllLayersOff();
	
	
	// draw the polygon on the map
	// use variable theAdminLine to store the polygon object, so that it can be removed later once the user is not editing any longer
	

	// add a listener to the polygon, so that when the user clicks on it, the edit form will appear:
	// the call for the form is:  showAdminResult(tablename, resultID);



}


function resetOverlayOL() {
	// the editing session has finished
	// remove the edit point or line or polygon from the map
	// use the variables theAdminPoint, theAdminLine or theAdminPolygon to do this
	
	/* **********************
	CODE REQUIRED HERE 
	********************** */

	
	// then switch all the map data back on - as it will have been switched off during edit
	updateMap(true);


}
