diff --git a/lib/OpenLayers/Control/OverviewMap.js b/lib/OpenLayers/Control/OverviewMap.js index 31ae04d293..19259d6428 100644 --- a/lib/OpenLayers/Control/OverviewMap.js +++ b/lib/OpenLayers/Control/OverviewMap.js @@ -78,24 +78,33 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, { /** * APIProperty: minRatio * {Float} The ratio of the overview map resolution to the main map - * resolution at which to zoom farther out on the overview map. + * resolution at which to zoom farther out on the overview map. */ minRatio: 8, /** * APIProperty: maxRatio * {Float} The ratio of the overview map resolution to the main map - * resolution at which to zoom farther in on the overview map. + * resolution at which to zoom farther in on the overview map. */ maxRatio: 32, /** * APIProperty: mapOptions * {Object} An object containing any non-default properties to be sent to - * the overview map's map constructor. These should include any non-default - * options that the main map was constructed with. + * the overview map's map constructor. These should include any + * non-default options that the main map was constructed with. */ mapOptions: null, + + /** + * APIProperty: autoPan + * {Boolean} Always pan the overview map, so the extent marker remains in + * the center. Default is false. If true, when you drag the extent + * marker, the overview map will update itself so the marker returns + * to the center. + */ + autoPan: true, /** * Property: handlers @@ -387,7 +396,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, { this.createMap(); } - if(!this.isSuitableOverview()) { + if(this.autoPan || !this.isSuitableOverview()) { this.updateOverview(); }