function load(){ //Main Google Map load function...if(point){ dLatLong.innerHTML="<b>Latitutde: </b>"+point.lat()+"<br/> <b>Longititude: </b>"+point.lng() ; changeCursor();//To change Cursor on Click sendLatLong(); //calling AJAX method to send Clicks //putting lat and long in seprate DIVs }}/* AJAX RELATED METHODS FOR SENDING CLICKS of LONG_LAT values in a Session Var WHILE DEFINING PATH and PREVIEW */function sendLatLong(){// Create the XMLHttpRequest object request = GXmlHttp.create(); // Prepare an asynchronous HTTP request to the server request.open("GET", "sendClicks.php?lat="+dLat.innerHTML+"&long="+dLong.innerHTML, true); //request.onreadystatechange = getCallbackFunction(request, processCityData); request.onreadystatechange=processData; // Send the query request.send(null);}//The call Back Functionfunction processData(){ var json = null; if (request.readyState == 4) { if (request.status == 200) { eval('json = ' + request.responseText); //alert(json.data.length); if(json.data.length > 1) { for (var i = 0; i <= json.data.length-1; i++) { pts[i] = new GLatLng(parseFloat(json.data[i].Latitude), parseFloat(json.data[i].Longitude)); addPoint(parseFloat(json.data[i].Latitude),parseFloat(json.data[i].Longitude),3); //given by Google in their utility file[poly.js] } }//Add Point for Encodingminimap.addOverlay(new GPolyline(pts,"Yellow","4"));var encodedPolyline1 = new GPolyline.fromEncoded({ color: "Green", weight: 4, points: encodedPoints, levels: encodedLevels, zoomFactor:12, numLevels: 4});minimap.addOverlay(encodedPolyline1); } }}