Add a new option to Control.OverviewMap to start maximized. r=bartvde (closes #2746)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@10674 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Frédéric Junod
2010-08-23 06:59:49 +00:00
parent 29dece02a5
commit cb3fc7842b
3 changed files with 40 additions and 9 deletions

View File

@@ -120,6 +120,12 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
*/
resolutionFactor: 1,
/**
* APIProperty: maximized
* {Boolean} Start as maximized (visible). Defaults to false.
*/
maximized: false,
/**
* Constructor: OpenLayers.Control.OverviewMap
* Create a new overview map
@@ -288,7 +294,10 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
}
this.map.events.register('moveend', this, this.update);
if (this.maximized) {
this.maximizeControl();
}
return this.div;
},