Skip to content

Commit

Permalink
One OSM attribution
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaub committed Oct 22, 2014
1 parent 1192890 commit 3f5dd45
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 31 deletions.
2 changes: 1 addition & 1 deletion examples/igc.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ var map = new ol.Map({
html: 'All maps © ' +
'<a href="http://www.opencyclemap.org/">OpenCycleMap</a>'
}),
ol.source.OSM.DATA_ATTRIBUTION
ol.source.OSM.ATTRIBUTION
],
url: 'http://{a-c}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png'
})
Expand Down
4 changes: 2 additions & 2 deletions examples/localized-openstreetmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var openCycleMapLayer = new ol.layer.Tile({
html: 'All maps &copy; ' +
'<a href="http://www.opencyclemap.org/">OpenCycleMap</a>'
}),
ol.source.OSM.DATA_ATTRIBUTION
ol.source.OSM.ATTRIBUTION
],
url: 'http://{a-c}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png'
})
Expand All @@ -29,7 +29,7 @@ var openSeaMapLayer = new ol.layer.Tile({
html: 'All maps &copy; ' +
'<a href="http://www.openseamap.org/">OpenSeaMap</a>'
}),
ol.source.OSM.DATA_ATTRIBUTION
ol.source.OSM.ATTRIBUTION
],
crossOrigin: null,
url: 'http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png'
Expand Down
2 changes: 1 addition & 1 deletion examples/xyz.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var map = new ol.Map({
html: 'Tiles &copy; <a href="http://www.opencyclemap.org/">' +
'OpenCycleMap</a>'
}),
ol.source.OSM.DATA_ATTRIBUTION
ol.source.OSM.ATTRIBUTION
],
url: 'http://{a-c}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png'
})
Expand Down
2 changes: 1 addition & 1 deletion src/ol/attribution.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ goog.require('ol.TileRange');
* html: 'All maps &copy; ' +
* '<a href="http://www.opencyclemap.org/">OpenCycleMap</a>'
* }),
* ol.source.OSM.DATA_ATTRIBUTION
* ol.source.OSM.ATTRIBUTION
* ],
* ..
*
Expand Down
4 changes: 2 additions & 2 deletions src/ol/source/mapquestsource.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ ol.source.MapQuestConfig = {
maxZoom: 28,
attributions: [
ol.source.MapQuest.TILE_ATTRIBUTION,
ol.source.OSM.DATA_ATTRIBUTION
ol.source.OSM.ATTRIBUTION
]
},
'sat': {
Expand All @@ -76,7 +76,7 @@ ol.source.MapQuestConfig = {
maxZoom: 18,
attributions: [
ol.source.MapQuest.TILE_ATTRIBUTION,
ol.source.OSM.DATA_ATTRIBUTION
ol.source.OSM.ATTRIBUTION
]
}
};
25 changes: 2 additions & 23 deletions src/ol/source/osmsource.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ol.source.OSM = function(opt_options) {
if (goog.isDef(options.attributions)) {
attributions = options.attributions;
} else {
attributions = ol.source.OSM.ATTRIBUTIONS;
attributions = [ol.source.OSM.ATTRIBUTION];
}

var crossOrigin = goog.isDef(options.crossOrigin) ?
Expand Down Expand Up @@ -51,29 +51,8 @@ goog.inherits(ol.source.OSM, ol.source.XYZ);
* @type {ol.Attribution}
* @api
*/
ol.source.OSM.DATA_ATTRIBUTION = new ol.Attribution({
ol.source.OSM.ATTRIBUTION = new ol.Attribution({
html: '&copy; ' +
'<a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> ' +
'contributors.'
});


/**
* @const
* @type {ol.Attribution}
* @api
*/
ol.source.OSM.TILE_ATTRIBUTION = new ol.Attribution({
html: '&copy; ' +
'<a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> ' +
'contributors.'
});


/**
* @const
* @type {Array.<ol.Attribution>}
*/
ol.source.OSM.ATTRIBUTIONS = [
ol.source.OSM.TILE_ATTRIBUTION
];
2 changes: 1 addition & 1 deletion src/ol/source/stamensource.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,5 @@ ol.source.Stamen.ATTRIBUTIONS = [
'under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY' +
' 3.0</a>.'
}),
ol.source.OSM.DATA_ATTRIBUTION
ol.source.OSM.ATTRIBUTION
];

0 comments on commit 3f5dd45

Please sign in to comment.