diff --git a/src/ol/source/openstreetmapsource.js b/src/ol/source/openstreetmapsource.js index d31c2e2981..5f73770068 100644 --- a/src/ol/source/openstreetmapsource.js +++ b/src/ol/source/openstreetmapsource.js @@ -4,6 +4,16 @@ goog.require('ol.Attribution'); goog.require('ol.source.XYZ'); +/** + * @const + * @type {Array.} + */ +ol.source.OPENSTREETMAP_ATTRIBUTIONS = [new ol.Attribution( + '© OpenStreetMap ' + + 'contributors, ' + + 'CC BY-SA')]; + + /** * @constructor @@ -20,14 +30,7 @@ ol.source.OpenStreetMap = function(opt_options) { } else if (goog.isDef(options.attribution)) { attributions = [options.attribution]; } else { - attributions = [ - new ol.Attribution( - '© OpenStreetMap ' + - 'contributors, ' + - ' ' + - 'CC BY-SA' + - '') - ]; + attributions = ol.source.OPENSTREETMAP_ATTRIBUTIONS; } var maxZoom = goog.isDef(options.maxZoom) ? options.maxZoom : 18;