Merge pull request #29 from fredj/map-original-options
Expose map original options. r=@elemoine
This commit is contained in:
@@ -239,6 +239,12 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
*/
|
||||
panRatio: 1.5,
|
||||
|
||||
/**
|
||||
* APIProperty: options
|
||||
* {Object} The options object passed to the class constructor. Read-only.
|
||||
*/
|
||||
options: null,
|
||||
|
||||
// Options
|
||||
|
||||
/**
|
||||
@@ -480,6 +486,9 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
this.theme = OpenLayers._getScriptLocation() +
|
||||
'theme/default/style.css';
|
||||
|
||||
// backup original options
|
||||
this.options = OpenLayers.Util.extend({}, options);
|
||||
|
||||
// now override default options
|
||||
OpenLayers.Util.extend(this, options);
|
||||
|
||||
@@ -731,6 +740,7 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
this.events.destroy();
|
||||
this.events = null;
|
||||
|
||||
this.options = null;
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user