Pullup changes since RC2. Fixes:
* WorldWind layer working again * Popup.destroy() complaints * Decompose marker destruction code for easier subclassing. * Error catching for better layerPx error in Map.js * Several eamples, including getFeatureInfo, fullScreen, worldwind, layer-opacity git-svn-id: http://svn.openlayers.org/branches/openlayers/2.1@1501 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -438,7 +438,9 @@ OpenLayers.Map.prototype = {
|
||||
removePopup: function(popup) {
|
||||
this.popups.remove(popup);
|
||||
if (popup.div) {
|
||||
this.layerContainerDiv.removeChild(popup.div);
|
||||
try { this.layerContainerDiv.removeChild(popup.div); }
|
||||
catch (e) { } // Popups sometimes apparently get disconnected
|
||||
// from the layerContainerDiv, and cause complaints.
|
||||
}
|
||||
popup.map = null;
|
||||
},
|
||||
@@ -475,17 +477,20 @@ OpenLayers.Map.prototype = {
|
||||
for(var i=0; i < this.layers.length; i++) {
|
||||
this.layers[i].onMapResize();
|
||||
}
|
||||
|
||||
var center = new OpenLayers.Pixel(newSize.w /2, newSize.h / 2);
|
||||
|
||||
var zoom = this.getZoom();
|
||||
this.zoom = null;
|
||||
this.setCenter(center, zoom);
|
||||
|
||||
// store the new size
|
||||
this.size = newSize;
|
||||
// the div might have moved on the page, also
|
||||
this.events.element.offsets = null;
|
||||
|
||||
if (this.baseLayer != null) {
|
||||
var center = new OpenLayers.Pixel(newSize.w /2, newSize.h / 2);
|
||||
var centerLL = this.getLonLatFromViewPortPx(center);
|
||||
var zoom = this.getZoom();
|
||||
this.zoom = null;
|
||||
this.setCenter(this.getCenter(), zoom);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
@@ -992,11 +997,11 @@ OpenLayers.Map.prototype = {
|
||||
var dX = -parseInt(this.layerContainerDiv.style.left);
|
||||
var dY = -parseInt(this.layerContainerDiv.style.top);
|
||||
layerPx = viewPortPx.add(dX, dY);
|
||||
if (isNaN(layerPx.x) || isNaN(layerPx.y)) {
|
||||
layerPx = null;
|
||||
}
|
||||
}
|
||||
if (!isNaN(layerPx.x) && !isNaN(layerPx.y)) {
|
||||
return layerPx;
|
||||
}
|
||||
return null;
|
||||
return layerPx;
|
||||
},
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user