Skip to content

Commit

Permalink
HCCGENERAL-130: Patch OpenLayers to support multiple OpenLayers.Layer…
Browse files Browse the repository at this point in the history
… objects with isBaseLayer = true. This patch allows Fusion to use and support multiple tiled map definitions, provided each tiled map definition contains only one base layer group in it.
  • Loading branch information
jumpinjackie committed May 17, 2011
1 parent 99613ba commit 8c841bf
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion lib/OpenLayers/OpenLayers.js
Expand Up @@ -6786,7 +6786,7 @@ OpenLayers.Map = OpenLayers.Class({
// set the first baselaye we add as the baselayer
this.setBaseLayer(layer);
} else {
layer.setVisibility(false);
//layer.setVisibility(false);
}
} else {
layer.redraw();
Expand Down Expand Up @@ -7565,6 +7565,21 @@ OpenLayers.Map = OpenLayers.Class({
}
}

//In the event of more than one base layer, send the move call to them too
for (var i=0, len=this.layers.length; i<len; i++) {
var layer = this.layers[i];
if (layer !== this.baseLayer && layer.isBaseLayer) {
layer.moveTo(bounds, zoomChanged, dragging);
if(dragging) {
layer.events.triggerEvent("move");
} else {
layer.events.triggerEvent("moveend",
{"zoomChanged": zoomChanged}
);
}
}
}

bounds = this.baseLayer.getExtent();

for (var i=0, len=this.layers.length; i<len; i++) {
Expand Down

0 comments on commit 8c841bf

Please sign in to comment.