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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Jul 1 04:22:09 PDT 2015


Author: syed
Date: 2015-07-01 04:22:09 -0700 (Wed, 01 Jul 2015)
New Revision: 9233

Modified:
   trunk/mapbender/http/plugins/mb_digitize_widget.php
Log:
enable data-export in firefox

Modified: trunk/mapbender/http/plugins/mb_digitize_widget.php
===================================================================
--- trunk/mapbender/http/plugins/mb_digitize_widget.php	2015-07-01 10:36:43 UTC (rev 9232)
+++ trunk/mapbender/http/plugins/mb_digitize_widget.php	2015-07-01 11:22:09 UTC (rev 9233)
@@ -363,7 +363,6 @@
 
         var outputformat = $(this).attr('outputformat');
         var url;
-        if(window.chrome) {
             // var fmt = $(dlg).find('input:checked').val();
             if(outputformat === 'kml') {
                 url = tokml(data, {simplestyle: true});
@@ -383,15 +382,13 @@
                 }
 
             }
-
             var link = document.createElement("a");
+            link.setAttribute('href', 'data:text/text;charset=utf-8,' +      encodeURI(url));
             link.setAttribute('download', 'myfeatures.' + outputformat);
-            link.href = URL.createObjectURL(new Blob([url], {type: 'application/octet-stream'}));
+            $(dlg).append(link);
             link.click();
-
+            $(dlg).remove(link);
             return false;
-        }
-        return undefined;
     });
 };
 



More information about the Mapbender_commits mailing list