In Map.setCenter, only call Layer.moveTo if Layer.getVisibility returns true.
In Layer.setVisibility, call Layer.moveTo with zoomChanged = true, so that the grid tiles are reloaded. In an ideal world, the grid tiles would only be loaded if they haven't been loaded yet. This would spare us the split second wait while the browser reloads those images from the cache, but we want to release today, so it'll have to wait. git-svn-id: http://svn.openlayers.org/trunk/openlayers@1448 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -226,7 +226,7 @@ OpenLayers.Layer.prototype = {
|
|||||||
if ((visible) && (this.map != null)) {
|
if ((visible) && (this.map != null)) {
|
||||||
var extent = this.map.getExtent();
|
var extent = this.map.getExtent();
|
||||||
if (extent != null) {
|
if (extent != null) {
|
||||||
this.moveTo(this.map.getExtent());
|
this.moveTo(this.map.getExtent(), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((this.map != null) &&
|
if ((this.map != null) &&
|
||||||
|
|||||||
@@ -606,7 +606,7 @@ OpenLayers.Map.prototype = {
|
|||||||
var bounds = this.getExtent();
|
var bounds = this.getExtent();
|
||||||
for (var i = 0; i < this.layers.length; i++) {
|
for (var i = 0; i < this.layers.length; i++) {
|
||||||
var layer = this.layers[i];
|
var layer = this.layers[i];
|
||||||
if ((layer == this.baseLayer) || !layer.isBaseLayer) {
|
if (layer.getVisibility()) {
|
||||||
layer.moveTo(bounds, zoomChanged, minor);
|
layer.moveTo(bounds, zoomChanged, minor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user