[OpenLayers-Commits] r7522 - sandbox/topp/trimet/lib/OpenLayers/Strategy

commits at openlayers.org commits at openlayers.org
Wed Jul 16 09:26:33 EDT 2008


Author: tschaub
Date: 2008-07-16 09:26:33 -0400 (Wed, 16 Jul 2008)
New Revision: 7522

Modified:
   sandbox/topp/trimet/lib/OpenLayers/Strategy/BBOX.js
Log:
Only trigger protocol read when layer is in range and visible.

Modified: sandbox/topp/trimet/lib/OpenLayers/Strategy/BBOX.js
===================================================================
--- sandbox/topp/trimet/lib/OpenLayers/Strategy/BBOX.js	2008-07-16 13:15:52 UTC (rev 7521)
+++ sandbox/topp/trimet/lib/OpenLayers/Strategy/BBOX.js	2008-07-16 13:26:33 UTC (rev 7522)
@@ -73,10 +73,12 @@
      * Method: updateListener
      */
     updateListener: function(event) {
-        var mapBounds = this.layer.map.getExtent();
-        if(event.force || this.invalidBounds(mapBounds)) {
-            this.calculateBounds(mapBounds);
-            this.triggerRead(event);
+        if(this.layer.inRange && this.layer.visibility) {
+            var mapBounds = this.layer.map.getExtent();
+            if(event.force || this.invalidBounds(mapBounds)) {
+                this.calculateBounds(mapBounds);
+                this.triggerRead(event);
+            }
         }
     },
     



More information about the Commits mailing list