[OpenLayers-Commits] r7482 - sandbox/vector-behavior/lib/OpenLayers/Strategy
commits at openlayers.org
commits at openlayers.org
Wed Jul 9 10:07:31 EDT 2008
Author: elemoine
Date: 2008-07-09 10:07:31 -0400 (Wed, 09 Jul 2008)
New Revision: 7482
Modified:
sandbox/vector-behavior/lib/OpenLayers/Strategy/Grid.js
Log:
do not add features to the layers if there are not
Modified: sandbox/vector-behavior/lib/OpenLayers/Strategy/Grid.js
===================================================================
--- sandbox/vector-behavior/lib/OpenLayers/Strategy/Grid.js 2008-07-09 13:07:01 UTC (rev 7481)
+++ sandbox/vector-behavior/lib/OpenLayers/Strategy/Grid.js 2008-07-09 14:07:31 UTC (rev 7482)
@@ -93,8 +93,11 @@
this.createFilter(),
function(resp) {
if (resp.code == OpenLayers.Protocol.Response.SUCCESS) {
- this.features = resp.features;
- this.strategy.layer.addFeatures(this.features);
+ var features = resp.features;
+ if (features && features.length > 0) {
+ this.features = features;
+ this.strategy.layer.addFeatures(features);
+ }
} else {
// FIXME
}
More information about the Commits
mailing list