Move attributions constant to constructor
This commit is contained in:
@@ -76,17 +76,6 @@ ol.source.StamenProviderConfig = {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @const {Array.<ol.Attribution>}
|
||||
*/
|
||||
ol.source.STAMEN_ATTRIBUTIONS = [
|
||||
new ol.Attribution(
|
||||
'Map tiles by <a href="http://stamen.com/">Stamen Design</a>, under ' +
|
||||
'<a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.'),
|
||||
ol.source.OSM.DATA_ATTRIBUTION
|
||||
];
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
@@ -108,7 +97,7 @@ ol.source.Stamen = function(options) {
|
||||
layerConfig.extension;
|
||||
|
||||
goog.base(this, {
|
||||
attributions: ol.source.STAMEN_ATTRIBUTIONS,
|
||||
attributions: ol.source.Stamen.ATTRIBUTIONS,
|
||||
crossOrigin: 'anonymous',
|
||||
maxZoom: providerConfig.maxZoom,
|
||||
// FIXME uncomment the following when tilegrid supports minZoom
|
||||
@@ -119,3 +108,14 @@ ol.source.Stamen = function(options) {
|
||||
|
||||
};
|
||||
goog.inherits(ol.source.Stamen, ol.source.XYZ);
|
||||
|
||||
|
||||
/**
|
||||
* @const {Array.<ol.Attribution>}
|
||||
*/
|
||||
ol.source.Stamen.ATTRIBUTIONS = [
|
||||
new ol.Attribution(
|
||||
'Map tiles by <a href="http://stamen.com/">Stamen Design</a>, under ' +
|
||||
'<a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.'),
|
||||
ol.source.OSM.DATA_ATTRIBUTION
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user