[fusion-commits] r2270 - trunk/layers

svn_fusion at osgeo.org svn_fusion at osgeo.org
Fri Nov 5 11:21:02 EDT 2010


Author: pagameba
Date: 2010-11-05 08:21:02 -0700 (Fri, 05 Nov 2010)
New Revision: 2270

Modified:
   trunk/layers/Layers.js
Log:
add events for layer data.

Modified: trunk/layers/Layers.js
===================================================================
--- trunk/layers/Layers.js	2010-11-05 14:34:52 UTC (rev 2269)
+++ trunk/layers/Layers.js	2010-11-05 15:21:02 UTC (rev 2270)
@@ -35,6 +35,10 @@
 Fusion.Event.LAYER_LOADING = Fusion.Event.lastEventId++;
 Fusion.Event.LAYER_START_EDIT = Fusion.Event.lastEventId++;
 Fusion.Event.LAYER_STOP_EDIT = Fusion.Event.lastEventId++;
+Fusion.Event.LAYER_DATA_FILTER = Fusion.Event.lastEventId++;
+Fusion.Event.LAYER_DATA_RELOAD = Fusion.Event.lastEventId++;
+Fusion.Event.LAYER_DATA_ADD = Fusion.Event.lastEventId++;
+Fusion.Event.LAYER_DATA_DELETE = Fusion.Event.lastEventId++;
 
 Fusion.Layers = OpenLayers.Class(Fusion.Lib.EventMgr, {
     bSingleTile: null,
@@ -67,6 +71,10 @@
         this.registerEventID(Fusion.Event.LAYER_PROPERTY_CHANGED);
         this.registerEventID(Fusion.Event.LAYER_START_EDIT);
         this.registerEventID(Fusion.Event.LAYER_STOP_EDIT);
+        this.registerEventID(Fusion.Event.LAYER_DATA_FILTER);
+        this.registerEventID(Fusion.Event.LAYER_DATA_RELOAD);
+        this.registerEventID(Fusion.Event.LAYER_DATA_ADD);
+        this.registerEventID(Fusion.Event.LAYER_DATA_DELETE);
         
         this.mapWidget = map;
         this.oSelection = null;
@@ -629,9 +637,11 @@
                         }
                       }
                       that.wfsConnection = new OpenLayers.Protocol.WFS({
+                        url: that.metadata.wfs_onlineresource,
                         version: version,
                         featureType: typeName,
-                        geometryName: that.metadata.wfs_geometry
+                        geometryName: that.metadata.wfs_geometry,
+                        srsName: that.oMap.oLayerOL.projection ? that.oMap.oLayerOL.projection.getCode() : '4326'
                       });
                     }
                   }
@@ -647,9 +657,9 @@
           //   version: version,
           //   featureType: typeName
           // });
+        } else if (callback) {
+          callback.apply(null, [this.wfsConnection]);
         }
-      } else if (callback) {
-        callback.apply(null, [this.wfsConnection]);
       }
     }
 });



More information about the fusion-commits mailing list