Pull up patches for the following bugs from trunk:
#385: building for windows users (fix license) #453: IE gives new DOM elements a parent with fragment node type #454: Fix tests which are breaking in Opera #455: Util.isEquivalentUrl broken in Opera #463: map.setBaseLayer is a bit funky #464: Overview Map dissappears when on permalinked page #465: allow controls to live outside viewport (for real) #466: HTMLDivElement is still undefined in IE7 (but OpenLayers.Util.alphaHack() is now false) #467: isEquivalentURL() not complete for IE #468: Overview MapLosing Rectangle #469: Default marker is incorrectly centered #470: Can not use "search" property IE7 #473: Remove call to checkImgURL #474: overview map isn't properly updated when the argparser kicks in git-svn-id: http://svn.openlayers.org/branches/openlayers/2.3@2181 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -431,16 +431,19 @@ OpenLayers.Map.prototype = {
|
||||
* @param {Boolean} noEvent
|
||||
*/
|
||||
setBaseLayer: function(newBaseLayer, noEvent) {
|
||||
var oldBaseLayer = this.baseLayer;
|
||||
var oldExtent = null;
|
||||
if(this.baseLayer) {
|
||||
oldExtent = this.baseLayer.getExtent();
|
||||
}
|
||||
|
||||
if (newBaseLayer != oldBaseLayer) {
|
||||
if (newBaseLayer != this.baseLayer) {
|
||||
|
||||
// is newBaseLayer an already loaded layer?
|
||||
if (OpenLayers.Util.indexOf(this.layers, newBaseLayer) != -1) {
|
||||
|
||||
// make the old base layer invisible
|
||||
if (oldBaseLayer != null) {
|
||||
oldBaseLayer.setVisibility(false, noEvent);
|
||||
if (this.baseLayer != null) {
|
||||
this.baseLayer.setVisibility(false, noEvent);
|
||||
}
|
||||
|
||||
// set new baselayer and make it visible
|
||||
@@ -450,10 +453,10 @@ OpenLayers.Map.prototype = {
|
||||
//redraw all layers
|
||||
var center = this.getCenter();
|
||||
if (center != null) {
|
||||
if (oldBaseLayer == null) {
|
||||
if (oldExtent == null) {
|
||||
this.setCenter(center);
|
||||
} else {
|
||||
this.zoomToExtent(oldBaseLayer.getExtent());
|
||||
this.zoomToExtent(oldExtent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -480,11 +483,13 @@ OpenLayers.Map.prototype = {
|
||||
* @param {OpenLayers.Pixel} px
|
||||
*/
|
||||
addControlToMap: function (control, px) {
|
||||
// If a control doesn't have a div at this point, it belongs in the
|
||||
// viewport.
|
||||
control.outsideViewport = (control.div != null);
|
||||
control.setMap(this);
|
||||
var div = control.draw(px);
|
||||
if (div) {
|
||||
// only elements without parents should be appended to the viewport
|
||||
if(!div.parentNode) {
|
||||
if(!control.outsideViewport) {
|
||||
div.style.zIndex = this.Z_INDEX_BASE['Control'] +
|
||||
this.controls.length;
|
||||
this.viewPortDiv.appendChild( div );
|
||||
|
||||
Reference in New Issue
Block a user