Ticket #937: patch-937-r5912-C1.diff
| File patch-937-r5912-C1.diff, 2.4 kB (added by elemoine, 10 months ago) |
|---|
-
lib/OpenLayers/Map.js
old new 1341 1341 for (var i = 0; i < this.layers.length; i++) { 1342 1342 var layer = this.layers[i]; 1343 1343 if (!layer.isBaseLayer) { 1344 1345 var moveLayer;1346 1344 var inRange = layer.calculateInRange(); 1347 1345 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. 1351 1350 layer.inRange = inRange; 1352 moveLayer = true; 1351 if (!inRange) { 1352 layer.display(false); 1353 } 1353 1354 this.events.triggerEvent("changelayer"); 1354 } else {1355 // If nothing has changed, then we only move the layer1356 // if it is visible and inrange.1357 moveLayer = (layer.visibility && layer.inRange);1358 1355 } 1359 1360 if (moveLayer) { 1356 if (inRange && layer.visibility) { 1361 1357 layer.moveTo(bounds, zoomChanged, dragging); 1362 1358 } 1363 1359 } -
lib/OpenLayers/Layer/WFS.js
old new 244 244 var outOfBounds = (!firstRendering && 245 245 !this.tile.bounds.containsBounds(bounds)); 246 246 247 if ( (zoomChanged || firstRendering || (!dragging && outOfBounds)) 248 && this.inRange) { 247 if (zoomChanged || firstRendering || (!dragging && outOfBounds)) { 249 248 //determine new tile bounds 250 249 var center = bounds.getCenterLonLat(); 251 250 var tileWidth = bounds.getWidth() * this.ratio;
