[Commits] r1689 - in sandbox/redlining/ux/FeatureEditing: examples ux/widgets ux/widgets/form

commits at geoext.org commits at geoext.org
Sat Jan 9 07:14:38 CET 2010


Author: cmoullet
Date: 2010-01-09 07:14:38 +0100 (Sat, 09 Jan 2010)
New Revision: 1689

Modified:
   sandbox/redlining/ux/FeatureEditing/examples/RedLiningPanelExample.html
   sandbox/redlining/ux/FeatureEditing/ux/widgets/FeatureEditingControler.js
   sandbox/redlining/ux/FeatureEditing/ux/widgets/form/RedLiningPanel.js
Log:
Experimental import/export.
Import seems ok.

Modified: sandbox/redlining/ux/FeatureEditing/examples/RedLiningPanelExample.html
===================================================================
--- sandbox/redlining/ux/FeatureEditing/examples/RedLiningPanelExample.html	2010-01-09 06:08:58 UTC (rev 1688)
+++ sandbox/redlining/ux/FeatureEditing/examples/RedLiningPanelExample.html	2010-01-09 06:14:38 UTC (rev 1689)
@@ -8,6 +8,16 @@
         <link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-3.0.0/examples/shared/examples.css" />
         <script type="text/javascript" src="http://openlayers.org/api/2.8/OpenLayers.js"></script>
         <script type="text/javascript" src="../../../trunk/geoext/lib/GeoExt.js"></script>
+
+        <script type="text/javascript" src="http://dev.geoext.org/sandbox/cmoullet/ux/LayerManager/ux/downloadify/js/swfobject.js"></script>
+        <script type="text/javascript" src="http://dev.geoext.org/sandbox/cmoullet/ux/LayerManager/ux/downloadify/js/downloadify.min.js"></script>
+        <script type="text/javascript" src="http://dev.geoext.org/sandbox/cmoullet/ux/LayerManager/ux/utils/flash.js"></script>
+        <script type="text/javascript" src="http://dev.geoext.org/sandbox/cmoullet/ux/LayerManager/ux/data/FormatStore.js"></script>
+        <script type="text/javascript" src="http://dev.geoext.org/sandbox/cmoullet/ux/LayerManager/ux/data/Export.js"></script>
+        <script type="text/javascript" src="http://dev.geoext.org/sandbox/cmoullet/ux/LayerManager/ux/data/Import.js"></script>
+        <script type="text/javascript" src="http://dev.geoext.org/sandbox/cmoullet/ux/LayerManager/ux/widgets/LayerManagerExportPanel.js"></script>
+        <script type="text/javascript" src="http://dev.geoext.org/sandbox/cmoullet/ux/LayerManager/ux/widgets/LayerManagerImportPanel.js"></script>
+        <script type="text/javascript" src="http://dev.geoext.org/sandbox/cmoullet/ux/LayerManager/ux/widgets/LayerManagerWindow.js"></script>
         
         <script type="text/javascript" src="../ux/FeatureEditing.js"></script>
         

Modified: sandbox/redlining/ux/FeatureEditing/ux/widgets/FeatureEditingControler.js
===================================================================
--- sandbox/redlining/ux/FeatureEditing/ux/widgets/FeatureEditingControler.js	2010-01-09 06:08:58 UTC (rev 1688)
+++ sandbox/redlining/ux/FeatureEditing/ux/widgets/FeatureEditingControler.js	2010-01-09 06:14:38 UTC (rev 1689)
@@ -67,6 +67,11 @@
      */    
     activeLayer: null,
 
+    /** api: config[activeLayer]
+     *  ``OpenLayers.Layer.Vector``  The layer in which data are imported.
+     */
+    importLayer: null,
+
     /** private: method[constructor]
      *  Private constructor override.
      */    
@@ -153,7 +158,7 @@
         this.featureControl = control;
         this.map.addControl(control);
 
-        action = new GeoExt.Action({
+        var action = new GeoExt.Action({
             //iconCls: "todo",
             text: "EditFeature",
             control: control,
@@ -286,10 +291,14 @@
     },
 
     /** private: method[initImportFeaturesAction]
+     *  :param event: ``OpenLayers.Layer.Vector`` Layer in which the data are imported
      *  Create a Ext.Action object that is set as the importFeaturesAction property
      *  and pushed to te actions array.
     */
-    initImportFeaturesAction: function() {
+    initImportFeaturesAction: function(layer) {
+        if (layer) {
+            this.importLayer = layer;
+        }
         var action = new Ext.Action({
             text: OpenLayers.i18n('Import'),
             handler: this.importFeatures,
@@ -304,7 +313,7 @@
      *  Import features process from a KML file.
      */
     importFeatures: function() {
-        alert('todo');
+        GeoExt.ux.data.Import.KMLImport(this.map, this.importLayer);
     },
 
     /** private: method[initExportAllFeaturesAction]
@@ -326,7 +335,8 @@
      *  Export all features as KML file.
      */
     exportAllFeatures: function() {
-        alert('todo');
+        // TODO no use of global export window.
+        GeoExt.ux.data.Export.KMLExport(this.map, this.layers, null,'http://dev.geoext.org/sandbox/cmoullet/ux/LayerManager/ux/data/ExportWindow.html');
     },
 
     /** private: method[getSelectControl]

Modified: sandbox/redlining/ux/FeatureEditing/ux/widgets/form/RedLiningPanel.js
===================================================================
--- sandbox/redlining/ux/FeatureEditing/ux/widgets/form/RedLiningPanel.js	2010-01-09 06:08:58 UTC (rev 1688)
+++ sandbox/redlining/ux/FeatureEditing/ux/widgets/form/RedLiningPanel.js	2010-01-09 06:14:38 UTC (rev 1689)
@@ -135,7 +135,7 @@
         this.controler.initDrawControls();
         this.controler.initFeatureControl();
         this.controler.initDeleteAllAction();
-        this.controler.initImportFeaturesAction();
+        this.controler.initImportFeaturesAction(this.layer);
         this.controler.initExportAllFeaturesAction();
 
         // Add buttons and toolbar



More information about the Commits mailing list