Image layer renderers add attributions to frame state

This commit is contained in:
Éric Lemoine
2013-01-31 13:37:18 +01:00
parent 6e8f5ef0fd
commit f540dd8689
8 changed files with 47 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ goog.require('goog.array');
goog.require('goog.events');
goog.require('goog.events.EventTarget');
goog.require('goog.events.EventType');
goog.require('ol.Attribution');
goog.require('ol.Extent');
@@ -27,8 +28,15 @@ ol.ImageState = {
* @param {number} resolution Resolution.
* @param {string} src Image source URI.
* @param {?string} crossOrigin Cross origin.
* @param {Array.<ol.Attribution>} attributions Attributions.
*/
ol.Image = function(extent, resolution, src, crossOrigin) {
ol.Image = function(extent, resolution, src, crossOrigin, attributions) {
/**
* @private
* @type {Array.<ol.Attribution>}
*/
this.attributions_ = attributions;
/**
* @private
@@ -86,6 +94,14 @@ ol.Image.prototype.dispatchChangeEvent = function() {
};
/**
* @return {Array.<ol.Attribution>} Attributions.
*/
ol.Image.prototype.getAttributions = function() {
return this.attributions_;
};
/**
* @return {ol.Extent} Extent.
*/