diff --git a/css/ol.css b/css/ol.css index 2f61746c6c..9ea161c497 100644 --- a/css/ol.css +++ b/css/ol.css @@ -26,6 +26,11 @@ .ol-attribution li:not(:last-child):after { content: "\2003"; } +.ol-attribution-bing-tos { + float:right; + padding-top: 2px; + white-space: nowrap; +} .ol-dragbox { position: absolute; border: 2px solid red; diff --git a/src/ol/source/bingmapssource.exports b/src/ol/source/bingmapssource.exports index 9f1a06157a..7ce0e42656 100644 --- a/src/ol/source/bingmapssource.exports +++ b/src/ol/source/bingmapssource.exports @@ -1 +1,2 @@ @exportClass ol.source.BingMaps ol.source.BingMapsOptions +@exportProperty ol.source.BingMaps.TOS_ATTRIBUTION diff --git a/src/ol/source/bingmapssource.js b/src/ol/source/bingmapssource.js index a19eac70a0..12526ff281 100644 --- a/src/ol/source/bingmapssource.js +++ b/src/ol/source/bingmapssource.js @@ -49,6 +49,17 @@ ol.source.BingMaps = function(options) { goog.inherits(ol.source.BingMaps, ol.source.TileImage); +/** + * @const + * @type {ol.Attribution} + */ +ol.source.BingMaps.TOS_ATTRIBUTION = new ol.Attribution({ + html: '' + + 'Terms of Use' +}); + + /** * @param {BingMapsImageryMetadataResponse} response Response. */ @@ -118,7 +129,7 @@ ol.source.BingMaps.prototype.handleImageryMetadataResponse = var minZ = coverageArea.zoomMin; var maxZ = coverageArea.zoomMax; var bbox = coverageArea.bbox; - var epsg4326Extent = [bbox[1], bbox[3], bbox[0], bbox[2]]; + var epsg4326Extent = [bbox[1], bbox[0], bbox[3], bbox[2]]; var extent = ol.extent.transform(epsg4326Extent, transform); var tileRange, z, zKey; for (z = minZ; z <= maxZ; ++z) { @@ -133,6 +144,7 @@ ol.source.BingMaps.prototype.handleImageryMetadataResponse = }); return new ol.Attribution({html: html, tileRanges: tileRanges}); }); + attributions.push(ol.source.BingMaps.TOS_ATTRIBUTION); this.setAttributions(attributions); this.setLogo(brandLogoUri);