Make attribution control options argument optional
This commit is contained in:
@@ -21,10 +21,11 @@ goog.require('ol.source.Source');
|
|||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.control.Control}
|
* @extends {ol.control.Control}
|
||||||
* @param {ol.control.AttributionOptions} attributionOptions Attribution
|
* @param {ol.control.AttributionOptions=} opt_options Options.
|
||||||
* options.
|
|
||||||
*/
|
*/
|
||||||
ol.control.Attribution = function(attributionOptions) {
|
ol.control.Attribution = function(opt_options) {
|
||||||
|
|
||||||
|
var options = goog.isDef(opt_options) ? opt_options : {};
|
||||||
|
|
||||||
this.ulElement_ = goog.dom.createElement(goog.dom.TagName.UL);
|
this.ulElement_ = goog.dom.createElement(goog.dom.TagName.UL);
|
||||||
|
|
||||||
@@ -34,8 +35,8 @@ ol.control.Attribution = function(attributionOptions) {
|
|||||||
|
|
||||||
goog.base(this, {
|
goog.base(this, {
|
||||||
element: element,
|
element: element,
|
||||||
map: attributionOptions.map,
|
map: options.map,
|
||||||
target: attributionOptions.target
|
target: options.target
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user