Add logo option to ol.source.Source

This commit is contained in:
Tom Payne
2013-04-05 18:11:22 +02:00
parent bcdff5a011
commit 6c90bcc5cd
2 changed files with 23 additions and 0 deletions

View File

@@ -145,6 +145,7 @@
@exportObjectLiteral ol.source.SourceOptions
@exportObjectLiteralProperty ol.source.SourceOptions.attributions Array.<ol.Attribution>|undefined
@exportObjectLiteralProperty ol.source.SourceOptions.extent ol.Extent|undefined
@exportObjectLiteralProperty ol.source.SourceOptions.logo string|undefined
@exportObjectLiteralProperty ol.source.SourceOptions.projection ol.ProjectionLike
@exportObjectLiteral ol.source.StamenOptions

View File

@@ -39,6 +39,12 @@ ol.source.Source = function(sourceOptions) {
this.attributions_ = goog.isDef(sourceOptions.attributions) ?
sourceOptions.attributions : null;
/**
* @private
* @type {string|undefined}
*/
this.logo_ = sourceOptions.logo;
};
goog.inherits(ol.source.Source, goog.events.EventTarget);
@@ -67,6 +73,14 @@ ol.source.Source.prototype.getExtent = function() {
};
/**
* @return {string|undefined} Logo.
*/
ol.source.Source.prototype.getLogo = function() {
return this.logo_;
};
/**
* @return {ol.Projection} Projection.
*/
@@ -103,6 +117,14 @@ ol.source.Source.prototype.setExtent = function(extent) {
};
/**
* @param {string|undefined} logo Logo.
*/
ol.source.Source.prototype.setLogo = function(logo) {
this.logo_ = logo;
};
/**
* @param {ol.Projection} projection Projetion.
*/