From f0bda2e0085ee730f1b99b57796977b955ad23a4 Mon Sep 17 00:00:00 2001 From: jonsowman Date: Wed, 21 Jul 2010 13:56:40 +0100 Subject: [PATCH] increased debug level for set with click --- predict/js/pred.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/predict/js/pred.js b/predict/js/pred.js index a06c717..1f7e861 100644 --- a/predict/js/pred.js +++ b/predict/js/pred.js @@ -449,6 +449,7 @@ function drawDeltaSquare(map) { } function setFormLatLon(GLatLng) { + appendDebug("Trying to set the form lat long"); $("#lat").val(GLatLng.lat().toFixed(4)); $("#lon").val(GLatLng.lng().toFixed(4)); // remove the event handler so another click doesn't register @@ -456,6 +457,7 @@ function setFormLatLon(GLatLng) { // change the dropdown to read "other" SetSiteOther(); // plot the new marker for launch location + appendDebug("Plotting the new launch location marker"); plotClick(); } @@ -463,8 +465,10 @@ function setLatLonByClick(state) { if ( state == true ) { // check this listener doesn't already exist if (!clickListener) { + appendDebug("Enabling the set with click listener"); clickListener = google.maps.event.addListener(map, 'click', function(event) { + appendDebug("Got a click from user, setting values into form"); $("#error_window").fadeOut(); setFormLatLon(event.latLng); }); @@ -472,6 +476,7 @@ function setLatLonByClick(state) { // tell the user what to do next throwError("Now click your desired launch location on the map"); } else if ( state == false ) { + appendDebug("Removing the set with click listener"); google.maps.event.removeListener(clickListener); clickListener = null; } else {