OpenLayers OpenLayers

Changeset 7482

Show
Ignore:
Timestamp:
07/09/08 10:07:31 (5 months ago)
Author:
elemoine
Message:

do not add features to the layers if there are not

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/vector-behavior/lib/OpenLayers/Strategy/Grid.js

    r7479 r7482  
    9494                function(resp) { 
    9595                    if (resp.code == OpenLayers.Protocol.Response.SUCCESS) { 
    96                         this.features = resp.features; 
    97                         this.strategy.layer.addFeatures(this.features); 
     96                        var features = resp.features; 
     97                        if (features && features.length > 0) { 
     98                            this.features = features; 
     99                            this.strategy.layer.addFeatures(features); 
     100                        } 
    98101                    } else { 
    99102                        // FIXME