[OpenLayers-Commits] r7518 - in sandbox/topp/trimet/lib/OpenLayers: Protocol/WFS Strategy

commits at openlayers.org commits at openlayers.org
Tue Jul 15 18:05:19 EDT 2008


Author: tschaub
Date: 2008-07-15 18:05:19 -0400 (Tue, 15 Jul 2008)
New Revision: 7518

Modified:
   sandbox/topp/trimet/lib/OpenLayers/Protocol/WFS/v1_0_0.js
   sandbox/topp/trimet/lib/OpenLayers/Strategy/BBOX.js
Log:
This will soon need reworking, but for now the bbox strategy passes the map projection on to the protocol.  Playing a bit loose with the cast to string while setting srsName.

Modified: sandbox/topp/trimet/lib/OpenLayers/Protocol/WFS/v1_0_0.js
===================================================================
--- sandbox/topp/trimet/lib/OpenLayers/Protocol/WFS/v1_0_0.js	2008-07-15 22:03:26 UTC (rev 7517)
+++ sandbox/topp/trimet/lib/OpenLayers/Protocol/WFS/v1_0_0.js	2008-07-15 22:05:19 UTC (rev 7518)
@@ -169,7 +169,7 @@
             attributes: {
                 typeName: (options.featureNS ? this.featurePrefix + ":" : "") +
                     options.featureType,
-                srsName: options.srsName || this.srsName
+                srsName: options.projection || this.srsName
             }
         });
         if(options.featureNS) {

Modified: sandbox/topp/trimet/lib/OpenLayers/Strategy/BBOX.js
===================================================================
--- sandbox/topp/trimet/lib/OpenLayers/Strategy/BBOX.js	2008-07-15 22:03:26 UTC (rev 7517)
+++ sandbox/topp/trimet/lib/OpenLayers/Strategy/BBOX.js	2008-07-15 22:05:19 UTC (rev 7518)
@@ -92,6 +92,8 @@
      */
     triggerRead: function(event) {
         event = event || {};
+        
+        var projection = this.layer.map.getProjectionObject();
 
         // create a BBOX spatial filter
         var filter = new OpenLayers.Filter.Spatial({
@@ -102,7 +104,7 @@
                 this.bounds.right - this.bounds.left,
                 this.bounds.top - this.bounds.bottom
             ),
-            projection: this.layer.projection
+            projection: projection
         });
  
         var params = this.params ?
@@ -111,6 +113,7 @@
         return this.layer.protocol.read({
             abortPrevious: true,
             filter: filter,
+            projection: projection,
             params: params,
             callback: function(resp) {
                 this.remove();



More information about the Commits mailing list