OpenLayers OpenLayers

Ticket #937: patch-937-r5912-C1.diff

File patch-937-r5912-C1.diff, 2.4 kB (added by elemoine, 10 months ago)

final patch including pgiraud's modification to Layer/WFS.js (remove inRange check)

  • lib/OpenLayers/Map.js

    old new  
    13411341            for (var i = 0; i < this.layers.length; i++) { 
    13421342                var layer = this.layers[i]; 
    13431343                if (!layer.isBaseLayer) { 
    1344                      
    1345                     var moveLayer; 
    13461344                    var inRange = layer.calculateInRange(); 
    13471345                    if (layer.inRange != inRange) { 
    1348                         // Layer property has changed. We are going  
    1349                         // to call moveLayer so that the layer can be turned 
    1350                         // off or on.    
     1346                        // the inRange property has changed. If the layer is 
     1347                        // no longer in range, we turn it off right away. If 
     1348                        // the layer is no longer out of range, the moveTo 
     1349                        // call below will turn on the layer. 
    13511350                        layer.inRange = inRange; 
    1352                         moveLayer = true; 
     1351                        if (!inRange) { 
     1352                            layer.display(false); 
     1353                        } 
    13531354                        this.events.triggerEvent("changelayer"); 
    1354                     } else { 
    1355                         // If nothing has changed, then we only move the layer 
    1356                         // if it is visible and inrange. 
    1357                         moveLayer = (layer.visibility && layer.inRange); 
    13581355                    } 
    1359  
    1360                     if (moveLayer) { 
     1356                    if (inRange && layer.visibility) { 
    13611357                        layer.moveTo(bounds, zoomChanged, dragging); 
    13621358                    } 
    13631359                }                 
  • lib/OpenLayers/Layer/WFS.js

    old new  
    244244        var outOfBounds = (!firstRendering && 
    245245                           !this.tile.bounds.containsBounds(bounds)); 
    246246 
    247         if ( (zoomChanged || firstRendering || (!dragging && outOfBounds)) 
    248              && this.inRange) { 
     247        if (zoomChanged || firstRendering || (!dragging && outOfBounds)) { 
    249248            //determine new tile bounds 
    250249            var center = bounds.getCenterLonLat(); 
    251250            var tileWidth = bounds.getWidth() * this.ratio;