make setOptions work for restrictedExtent change, like it was before #3062. r=bartvde (closes #3144)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11608 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2011-03-02 11:09:24 +00:00
parent fb5f081ea6
commit 2a12176915
2 changed files with 28 additions and 2 deletions

View File

@@ -739,7 +739,13 @@ OpenLayers.Map = OpenLayers.Class({
* options - {Object} Hashtable of options to tag to the map
*/
setOptions: function(options) {
var updatePxExtent = this.minPx &&
options.restrictedExtent != this.restrictedExtent;
OpenLayers.Util.extend(this, options);
// force recalculation of minPx and maxPx
updatePxExtent && this.moveTo(this.getCachedCenter(), this.zoom, {
forceZoomChange: true
});
},
/**