From 575ae03f5db0caa4c62293a4a6db39c76ca3a39a Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Mon, 30 Jul 2012 21:51:58 +0200 Subject: [PATCH] Add ol.Attribution --- src/ol/base/attribution.js | 59 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/ol/base/attribution.js diff --git a/src/ol/base/attribution.js b/src/ol/base/attribution.js new file mode 100644 index 0000000000..7363b82c9c --- /dev/null +++ b/src/ol/base/attribution.js @@ -0,0 +1,59 @@ +goog.provide('ol.Attribution'); + +goog.require('ol.CoverageArea'); +goog.require('ol.Projection'); + + + +/** + * @constructor + * @param {string} html HTML. + * @param {Array.=} opt_coverageAreas Coverage areas. + * @param {ol.Projection=} opt_projection Projection. + */ +ol.Attribution = function(html, opt_coverageAreas, opt_projection) { + + /** + * @private + * @type {string} + */ + this.html_ = html; + + /** + * @private + * @type {Array.} + */ + this.coverageAreas_ = + goog.isDef(opt_coverageAreas) ? opt_coverageAreas : null; + + /** + * @private + * @type {ol.Projection} + */ + this.projection_ = goog.isDef(opt_projection) ? opt_projection : null; + +}; + + +/** + * @return {Array.} Coverage areas. + */ +ol.Attribution.prototype.getCoverageAreas = function() { + return this.coverageAreas_; +}; + + +/** + * @return {string} HTML. + */ +ol.Attribution.prototype.getHtml = function() { + return this.html_; +}; + + +/** + * @return {ol.Projection} Projection. + */ +ol.Attribution.prototype.getProjection = function() { + return this.projection_; +};