[Mapbender-commits] r7482 - trunk/mapbender/http/plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Jan 28 05:29:54 EST 2011


Author: kmq
Date: 2011-01-28 02:29:54 -0800 (Fri, 28 Jan 2011)
New Revision: 7482

Modified:
   trunk/mapbender/http/plugins/mb_print.js
Log:
fix contentTupe ambiguity problem in print

Modified: trunk/mapbender/http/plugins/mb_print.js
===================================================================
--- trunk/mapbender/http/plugins/mb_print.js	2011-01-28 08:39:46 UTC (rev 7481)
+++ trunk/mapbender/http/plugins/mb_print.js	2011-01-28 10:29:54 UTC (rev 7482)
@@ -217,15 +217,17 @@
 	 * GETs the config, build corresponding form, remove an existing printBox
 	 */		
 	this.loadConfig = function (configFilename, callback) {
+		// the dataType to $.get is given explicitely, because there were instances of Mapbender that were returning 
+		// either json or a string, which trips up $.parseJSON which was being used in the callback
 		$.get(mbPrintConfigPath + configFilename, function(json, status){
-		    actualConfig = $.parseJSON(json);
+		    actualConfig = json;
 		    buildForm(); 
 		    hookForm();
 			if (typeof callback === "function") {
 				printBox = null;
 				callback();
 			}
-		});
+		},"json");
 		destroyPrintBox();
 	};
 



More information about the Mapbender_commits mailing list