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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Dec 8 07:31:21 EST 2009


Author: kmq
Date: 2009-12-08 07:31:20 -0500 (Tue, 08 Dec 2009)
New Revision: 5079

Added:
   trunk/mapbender/http/plugins/mb_resultList_SaveAsFile.js
Log:
Module that adds a "Save as File" button to resultList

Added: trunk/mapbender/http/plugins/mb_resultList_SaveAsFile.js
===================================================================
--- trunk/mapbender/http/plugins/mb_resultList_SaveAsFile.js	                        (rev 0)
+++ trunk/mapbender/http/plugins/mb_resultList_SaveAsFile.js	2009-12-08 12:31:20 UTC (rev 5079)
@@ -0,0 +1,22 @@
+var WFSSaveAsFile = function(data){
+	var req = new parent.Mapbender.Ajax.Request({
+		url: "../php/mod_echo.php",
+		method:"createFile",
+		parameters: {
+			data: data.geoJSON
+		},
+		callback : function(result, success, message){
+			if(success){
+				parent.document.location.href= result.url;
+			}else{
+
+			}
+
+		}
+			
+	});
+	req.send();
+
+}
+
+parent.Mapbender.modules.resultList.addGlobalButton({"title":"Save as File", "callback": WFSSaveAsFile});



More information about the Mapbender_commits mailing list