From b7e9b8b461fabd7cddf25e9320d25f2fd9737053 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Sat, 16 Dec 2017 08:40:02 -0700 Subject: [PATCH] Remove logos --- changelog/upgrade-notes.md | 4 + css/ol.css | 10 -- doc/errors/index.md | 8 -- examples/custom-icon.html | 9 -- examples/custom-icon.js | 27 ---- examples/image-load-events.js | 1 - examples/tile-load-events.js | 1 - externs/bingmaps.js | 11 -- externs/olx.js | 150 ----------------------- src/ol/PluggableMap.js | 62 ---------- src/ol/control/Attribution.js | 78 +----------- src/ol/renderer/Layer.js | 20 --- src/ol/renderer/canvas/ImageLayer.js | 1 - src/ol/renderer/canvas/TileLayer.js | 1 - src/ol/renderer/canvas/VectorLayer.js | 3 - src/ol/renderer/webgl/ImageLayer.js | 2 - src/ol/renderer/webgl/TileLayer.js | 1 - src/ol/renderer/webgl/VectorLayer.js | 3 - src/ol/source/BingMaps.js | 7 -- src/ol/source/CartoDB.js | 1 - src/ol/source/Cluster.js | 1 - src/ol/source/Image.js | 1 - src/ol/source/ImageArcGISRest.js | 1 - src/ol/source/ImageCanvas.js | 1 - src/ol/source/ImageStatic.js | 1 - src/ol/source/ImageWMS.js | 1 - src/ol/source/Raster.js | 1 - src/ol/source/Source.js | 32 ----- src/ol/source/Tile.js | 1 - src/ol/source/TileArcGISRest.js | 1 - src/ol/source/TileImage.js | 1 - src/ol/source/TileWMS.js | 1 - src/ol/source/UrlTile.js | 1 - src/ol/source/Vector.js | 1 - src/ol/source/VectorTile.js | 1 - src/ol/source/WMTS.js | 1 - src/ol/source/XYZ.js | 1 - src/ol/source/Zoomify.js | 1 - src/ol/typedefs.js | 5 - test/spec/ol/control/attribution.test.js | 2 +- 40 files changed, 8 insertions(+), 448 deletions(-) delete mode 100644 examples/custom-icon.html delete mode 100644 examples/custom-icon.js diff --git a/changelog/upgrade-notes.md b/changelog/upgrade-notes.md index b9fd930d7e..edf992bf7e 100644 --- a/changelog/upgrade-notes.md +++ b/changelog/upgrade-notes.md @@ -31,6 +31,10 @@ and calling it before using projections, and any time the proj4 registry was cha register(proj4); ``` +#### Removal of logos + +The map and sources no longer accept a `logo` option. Instead, if you wish to append a logo to your map, add the desired markup directly in your HTML. In addition, you can use the `attributions` property of a source to display arbitrary markup per-source with the attribution control. + ### v4.6.0 #### Renamed `exceedLength` option of `ol.style.Text` to `overflow` diff --git a/css/ol.css b/css/ol.css index 94cdaaaa66..4deaf032b5 100644 --- a/css/ol.css +++ b/css/ol.css @@ -179,9 +179,6 @@ .ol-attribution.ol-collapsed ul { display: none; } -.ol-attribution.ol-logo-only ul { - display: block; -} .ol-attribution:not(.ol-collapsed) { background: rgba(255,255,255,0.8); } @@ -192,17 +189,10 @@ height: 1.1em; line-height: 1em; } -.ol-attribution.ol-logo-only { - background: transparent; - bottom: .4em; - height: 1.1em; - line-height: 1em; -} .ol-attribution.ol-uncollapsible img { margin-top: -.2em; max-height: 1.6em; } -.ol-attribution.ol-logo-only button, .ol-attribution.ol-uncollapsible button { display: none; } diff --git a/doc/errors/index.md b/doc/errors/index.md index 4d7770b509..42a135e256 100644 --- a/doc/errors/index.md +++ b/doc/errors/index.md @@ -165,14 +165,6 @@ Expected an `ol.style.Style` or an array of `ol.style.Style`. Expected `layers` to be an array or an `ol.Collection`. -### 44 - -`logo.href` should be a string. - -### 45 - -`logo.src` should be a string. - ### 46 Incorrect format for `renderer` option. diff --git a/examples/custom-icon.html b/examples/custom-icon.html deleted file mode 100644 index e4fa79f342..0000000000 --- a/examples/custom-icon.html +++ /dev/null @@ -1,9 +0,0 @@ ---- -layout: example.html -title: Custom Icon -shortdesc: Example using a custom attribution icon object -docs: > - This example creates a custom element for the attribution icon -tags: "icon, element" ---- -
diff --git a/examples/custom-icon.js b/examples/custom-icon.js deleted file mode 100644 index b2f3f4ad43..0000000000 --- a/examples/custom-icon.js +++ /dev/null @@ -1,27 +0,0 @@ -import _ol_Map_ from '../src/ol/Map.js'; -import _ol_View_ from '../src/ol/View.js'; -import _ol_layer_Tile_ from '../src/ol/layer/Tile.js'; -import _ol_source_OSM_ from '../src/ol/source/OSM.js'; - -var logoElement = document.createElement('a'); -logoElement.href = 'https://www.osgeo.org/'; -logoElement.target = '_blank'; - -var logoImage = document.createElement('img'); -logoImage.src = 'https://www.osgeo.org/sites/all/themes/osgeo/logo.png'; - -logoElement.appendChild(logoImage); - -var map = new _ol_Map_({ - layers: [ - new _ol_layer_Tile_({ - source: new _ol_source_OSM_() - }) - ], - target: 'map', - view: new _ol_View_({ - center: [0, 0], - zoom: 2 - }), - logo: logoElement -}); diff --git a/examples/image-load-events.js b/examples/image-load-events.js index 082b2f158a..3ffc6715e5 100644 --- a/examples/image-load-events.js +++ b/examples/image-load-events.js @@ -95,7 +95,6 @@ source.on('imageloaderror', function() { }); var map = new _ol_Map_({ - logo: false, layers: [ new _ol_layer_Image_({source: source}) ], diff --git a/examples/tile-load-events.js b/examples/tile-load-events.js index c7be28be85..b829b4688e 100644 --- a/examples/tile-load-events.js +++ b/examples/tile-load-events.js @@ -94,7 +94,6 @@ source.on('tileloaderror', function() { }); var map = new _ol_Map_({ - logo: false, layers: [ new _ol_layer_Tile_({source: source}) ], diff --git a/externs/bingmaps.js b/externs/bingmaps.js index d38bb4e42e..b993a4ee47 100644 --- a/externs/bingmaps.js +++ b/externs/bingmaps.js @@ -3,7 +3,6 @@ */ - /** * @constructor */ @@ -28,7 +27,6 @@ BingMapsCoverageArea.prototype.zoomMax; BingMapsCoverageArea.prototype.zoomMin; - /** * @constructor */ @@ -47,7 +45,6 @@ BingMapsImageryProvider.prototype.attribution; BingMapsImageryProvider.prototype.coverageAreas; - /** * @constructor */ @@ -60,12 +57,6 @@ var BingMapsImageryMetadataResponse = function() {}; BingMapsImageryMetadataResponse.prototype.authenticationResultCode; -/** - * @type {string} - */ -BingMapsImageryMetadataResponse.prototype.brandLogoUri; - - /** * @type {string} */ @@ -96,7 +87,6 @@ BingMapsImageryMetadataResponse.prototype.statusDescription; BingMapsImageryMetadataResponse.prototype.traceId; - /** * @constructor */ @@ -157,7 +147,6 @@ BingMapsResource.prototype.zoomMax; BingMapsResource.prototype.zoomMin; - /** * @constructor */ diff --git a/externs/olx.js b/externs/olx.js index bbe90a7adc..7b95c97a5b 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -5,29 +5,6 @@ var olx; -/** - * Object literal with config options for the map logo. - * @typedef {{href: (string), src: (string)}} - */ -olx.LogoOptions; - - -/** - * Link url for the logo. Will be followed when the logo is clicked. - * @type {string} - * @api - */ -olx.LogoOptions.prototype.href; - - -/** - * Image src for the logo. - * @type {string} - * @api - */ -olx.LogoOptions.prototype.src; - - /** * Options for tile constructors. * @typedef {{transition: (number|undefined)}} @@ -4177,7 +4154,6 @@ olx.source.BingMapsOptions.prototype.transition; * extent: (ol.Extent|undefined), * format: (ol.format.Feature|undefined), * geometryFunction: (undefined|function(ol.Feature):ol.geom.Point), - * logo: (string|undefined), * projection: ol.ProjectionLike, * source: ol.source.Vector, * wrapX: (boolean|undefined)}} @@ -4236,14 +4212,6 @@ olx.source.ClusterOptions.prototype.geometryFunction; olx.source.ClusterOptions.prototype.format; -/** - * Logo. - * @type {string|undefined} - * @api - */ -olx.source.ClusterOptions.prototype.logo; - - /** * Projection. * @type {ol.ProjectionLike} @@ -4321,7 +4289,6 @@ olx.source.TileUTFGridOptions.prototype.url; * @typedef {{attributions: (ol.AttributionLike|undefined), * cacheSize: (number|undefined), * crossOrigin: (null|string|undefined), - * logo: (string|olx.LogoOptions|undefined), * opaque: (boolean|undefined), * projection: ol.ProjectionLike, * reprojectionErrorThreshold: (number|undefined), @@ -4369,14 +4336,6 @@ olx.source.TileImageOptions.prototype.cacheSize; olx.source.TileImageOptions.prototype.crossOrigin; -/** - * Logo. - * @type {string|olx.LogoOptions|undefined} - * @api - */ -olx.source.TileImageOptions.prototype.logo; - - /** * Whether the layer is opaque. * @type {boolean|undefined} @@ -4502,7 +4461,6 @@ olx.source.TileImageOptions.prototype.transition; * @typedef {{attributions: (ol.AttributionLike|undefined), * cacheSize: (number|undefined), * format: (ol.format.Feature|undefined), - * logo: (string|olx.LogoOptions|undefined), * overlaps: (boolean|undefined), * projection: ol.ProjectionLike, * state: (ol.source.State|undefined), @@ -4545,14 +4503,6 @@ olx.source.VectorTileOptions.prototype.cacheSize; olx.source.VectorTileOptions.prototype.format; -/** - * Logo. - * @type {string|olx.LogoOptions|undefined} - * @api - */ -olx.source.VectorTileOptions.prototype.logo; - - /** * This source may have overlapping geometries. Default is `true`. Setting this * to `false` (e.g. for sources with polygons that represent administrative @@ -4953,7 +4903,6 @@ olx.source.OSMOptions.prototype.wrapX; * @typedef {{attributions: (ol.AttributionLike|undefined), * crossOrigin: (null|string|undefined), * hidpi: (boolean|undefined), - * logo: (string|olx.LogoOptions|undefined), * imageLoadFunction: (ol.ImageLoadFunctionType|undefined), * params: Object., * projection: ol.ProjectionLike, @@ -4993,14 +4942,6 @@ olx.source.ImageArcGISRestOptions.prototype.crossOrigin; olx.source.ImageArcGISRestOptions.prototype.hidpi; -/** - * Logo. - * @type {string|olx.LogoOptions|undefined} - * @api - */ -olx.source.ImageArcGISRestOptions.prototype.logo; - - /** * Optional function to load an image given a URL. * @type {ol.ImageLoadFunctionType|undefined} @@ -5060,7 +5001,6 @@ olx.source.ImageArcGISRestOptions.prototype.url; /** * @typedef {{attributions: (ol.AttributionLike|undefined), * canvasFunction: ol.CanvasFunctionType, - * logo: (string|olx.LogoOptions|undefined), * projection: ol.ProjectionLike, * ratio: (number|undefined), * resolutions: (Array.|undefined), @@ -5092,14 +5032,6 @@ olx.source.ImageCanvasOptions.prototype.attributions; olx.source.ImageCanvasOptions.prototype.canvasFunction; -/** - * Logo. - * @type {string|olx.LogoOptions|undefined} - * @api - */ -olx.source.ImageCanvasOptions.prototype.logo; - - /** * Projection. * @type {ol.ProjectionLike} @@ -5199,7 +5131,6 @@ olx.source.RasterOptions.prototype.operationType; * crossOrigin: (null|string|undefined), * hidpi: (boolean|undefined), * serverType: (ol.source.WMSServerType|string|undefined), - * logo: (string|olx.LogoOptions|undefined), * imageLoadFunction: (ol.ImageLoadFunctionType|undefined), * params: Object., * projection: ol.ProjectionLike, @@ -5256,14 +5187,6 @@ olx.source.ImageWMSOptions.prototype.serverType; olx.source.ImageWMSOptions.prototype.imageLoadFunction; -/** - * Logo. - * @type {string|olx.LogoOptions|undefined} - * @api - */ -olx.source.ImageWMSOptions.prototype.logo; - - /** * WMS request parameters. At least a `LAYERS` param is required. `STYLES` is * `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX` @@ -5407,7 +5330,6 @@ olx.source.StamenOptions.prototype.wrapX; * imageExtent: (ol.Extent), * imageLoadFunction: (ol.ImageLoadFunctionType|undefined), * imageSize: (ol.Size|undefined), - * logo: (string|olx.LogoOptions|undefined), * projection: ol.ProjectionLike, * url: string}} */ @@ -5451,14 +5373,6 @@ olx.source.ImageStaticOptions.prototype.imageExtent; olx.source.ImageStaticOptions.prototype.imageLoadFunction; -/** - * Optional logo. - * @type {string|olx.LogoOptions|undefined} - * @api - */ -olx.source.ImageStaticOptions.prototype.logo; - - /** * Projection. * @type {ol.ProjectionLike} @@ -5489,7 +5403,6 @@ olx.source.ImageStaticOptions.prototype.url; * cacheSize: (number|undefined), * crossOrigin: (null|string|undefined), * params: (Object.|undefined), - * logo: (string|olx.LogoOptions|undefined), * tileGrid: (ol.tilegrid.TileGrid|undefined), * projection: ol.ProjectionLike, * reprojectionErrorThreshold: (number|undefined), @@ -5544,14 +5457,6 @@ olx.source.TileArcGISRestOptions.prototype.crossOrigin; olx.source.TileArcGISRestOptions.prototype.params; -/** - * Logo. - * @type {string|olx.LogoOptions|undefined} - * @api - */ -olx.source.TileArcGISRestOptions.prototype.logo; - - /** * Tile grid. Base this on the resolutions, tilesize and extent supported by the * server. @@ -5746,7 +5651,6 @@ olx.source.TileJSONOptions.prototype.transition; * crossOrigin: (null|string|undefined), * gutter: (number|undefined), * hidpi: (boolean|undefined), - * logo: (string|olx.LogoOptions|undefined), * tileClass: (function(new: ol.ImageTile, ol.TileCoord, * ol.TileState, string, ?string, * ol.TileLoadFunctionType)|undefined), @@ -5825,14 +5729,6 @@ olx.source.TileWMSOptions.prototype.gutter; olx.source.TileWMSOptions.prototype.hidpi; -/** - * Logo. - * @type {string|olx.LogoOptions|undefined} - * @api - */ -olx.source.TileWMSOptions.prototype.logo; - - /** * Class used to instantiate image tiles. Default is {@link ol.ImageTile}. * @type {function(new: ol.ImageTile, ol.TileCoord, @@ -5936,7 +5832,6 @@ olx.source.TileWMSOptions.prototype.transition; * features: (Array.|ol.Collection.|undefined), * format: (ol.format.Feature|undefined), * loader: (ol.FeatureLoader|undefined), - * logo: (string|olx.LogoOptions|undefined), * overlaps: (boolean|undefined), * strategy: (ol.LoadingStrategy|undefined), * url: (string|ol.FeatureUrlFunction|undefined), @@ -6013,14 +5908,6 @@ olx.source.VectorOptions.prototype.format; olx.source.VectorOptions.prototype.loader; -/** - * Logo. - * @type {string|olx.LogoOptions|undefined} - * @api - */ -olx.source.VectorOptions.prototype.logo; - - /** * This source may have overlapping geometries. Default is `true`. Setting this * to `false` (e.g. for sources with polygons that represent administrative @@ -6099,7 +5986,6 @@ olx.source.VectorOptions.prototype.wrapX; * @typedef {{attributions: (ol.AttributionLike|undefined), * cacheSize: (number|undefined), * crossOrigin: (string|null|undefined), - * logo: (string|olx.LogoOptions|undefined), * tileGrid: ol.tilegrid.WMTS, * projection: ol.ProjectionLike, * reprojectionErrorThreshold: (number|undefined), @@ -6151,14 +6037,6 @@ olx.source.WMTSOptions.prototype.cacheSize; olx.source.WMTSOptions.prototype.crossOrigin; -/** - * Logo. - * @type {string|olx.LogoOptions|undefined} - * @api - */ -olx.source.WMTSOptions.prototype.logo; - - /** * Tile grid. * @type {ol.tilegrid.WMTS} @@ -6315,7 +6193,6 @@ olx.source.WMTSOptions.prototype.transition; * @typedef {{attributions: (ol.AttributionLike|undefined), * cacheSize: (number|undefined), * crossOrigin: (null|string|undefined), - * logo: (string|olx.LogoOptions|undefined), * opaque: (boolean|undefined), * projection: ol.ProjectionLike, * reprojectionErrorThreshold: (number|undefined), @@ -6362,14 +6239,6 @@ olx.source.XYZOptions.prototype.cacheSize; olx.source.XYZOptions.prototype.crossOrigin; -/** - * Logo. - * @type {string|olx.LogoOptions|undefined} - * @api - */ -olx.source.XYZOptions.prototype.logo; - - /** * Whether the layer is opaque. * @type {boolean|undefined} @@ -6499,7 +6368,6 @@ olx.source.XYZOptions.prototype.transition; * @typedef {{attributions: (ol.AttributionLike|undefined), * cacheSize: (number|undefined), * crossOrigin: (null|string|undefined), - * logo: (string|olx.LogoOptions|undefined), * projection: ol.ProjectionLike, * maxZoom: (number|undefined), * minZoom: (number|undefined), @@ -6539,14 +6407,6 @@ olx.source.CartoDBOptions.prototype.cacheSize; olx.source.CartoDBOptions.prototype.crossOrigin; -/** - * Logo. - * @type {string|olx.LogoOptions|undefined} - * @api - */ -olx.source.CartoDBOptions.prototype.logo; - - /** * Projection. Default is `EPSG:3857`. * @type {ol.ProjectionLike} @@ -6614,7 +6474,6 @@ olx.source.CartoDBOptions.prototype.account; * @typedef {{attributions: (ol.AttributionLike|undefined), * cacheSize: (number|undefined), * crossOrigin: (null|string|undefined), - * logo: (string|olx.LogoOptions|undefined), * projection: (ol.ProjectionLike|undefined), * reprojectionErrorThreshold: (number|undefined), * url: !string, @@ -6655,14 +6514,6 @@ olx.source.ZoomifyOptions.prototype.cacheSize; olx.source.ZoomifyOptions.prototype.crossOrigin; -/** - * Logo. - * @type {string|olx.LogoOptions|undefined} - * @api - */ -olx.source.ZoomifyOptions.prototype.logo; - - /** * Projection. * @type {ol.ProjectionLike|undefined} @@ -7798,7 +7649,6 @@ olx.view.FitOptions.prototype.callback; * index: number, * layerStates: Object., * layerStatesArray: Array., - * logos: Object., * pixelRatio: number, * pixelToCoordinateTransform: ol.Transform, * postRenderFunctions: Array., diff --git a/src/ol/PluggableMap.js b/src/ol/PluggableMap.js index 6b480bf94f..0bb3189328 100644 --- a/src/ol/PluggableMap.js +++ b/src/ol/PluggableMap.js @@ -24,7 +24,6 @@ import {createEmpty, clone, createOrUpdateEmpty, equals, getForViewAndSize, isEm import {TRUE} from './functions.js'; import _ol_has_ from './has.js'; import _ol_layer_Group_ from './layer/Group.js'; -import _ol_obj_ from './obj.js'; import _ol_plugins_ from './plugins.js'; import _ol_renderer_Type_ from './renderer/Type.js'; import _ol_size_ from './size.js'; @@ -41,7 +40,6 @@ import _ol_transform_ from './transform.js'; * layers: (Array.|ol.Collection.|undefined), * loadTilesWhileAnimating: (boolean|undefined), * loadTilesWhileInteracting: (boolean|undefined), - * logo: (boolean|string|olx.LogoOptions|Element|undefined), * moveTolerance: (number|undefined), * overlays: (ol.Collection.|Array.|undefined), * renderer: (ol.renderer.Type|Array.|undefined), @@ -86,13 +84,6 @@ export var MapOptions; * true, tiles will be loaded while interacting with the map. This may * improve the user experience, but can also make map panning and zooming * choppy on devices with slow memory. Default is `false`. - * @param {boolean|string|olx.LogoOptions|Element|undefined} options.logo The - * map logo. A logo to be displayed on the map at all times. If a string is - * provided, it will be set as the image source of the logo. If an object is - * provided, the `src` property should be the URL for an image and the - * `href` property should be a URL for creating a link. If an element is - * provided, the element will be used. To disable the map logo, set the - * option to `false`. By default, the OpenLayers logo is shown. * @param {number|undefined} options.moveTolerance The minimum distance in * pixels the cursor must move to be detected as a map move event instead * of a click. Increasing this value can make it easier to click on the map. @@ -147,12 +138,6 @@ var _ol_PluggableMap_ = function(options) { this.pixelRatio_ = options.pixelRatio !== undefined ? options.pixelRatio : _ol_has_.DEVICE_PIXEL_RATIO; - /** - * @private - * @type {Object.} - */ - this.logos_ = optionsInternal.logos; - /** * @private * @type {number|undefined} @@ -1234,7 +1219,6 @@ _ol_PluggableMap_.prototype.renderFrame_ = function(time) { index: this.frameIndex_++, layerStates: layerStates, layerStatesArray: layerStatesArray, - logos: _ol_obj_.assign({}, this.logos_), pixelRatio: this.pixelRatio_, pixelToCoordinateTransform: this.pixelToCoordinateTransform_, postRenderFunctions: [], @@ -1399,34 +1383,6 @@ _ol_PluggableMap_.DEFAULT_RENDERER_TYPES = [ ]; -/** - * @const - * @type {string} - */ -_ol_PluggableMap_.LOGO_URL = 'data:image/png;base64,' + - 'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA3NCSVQICAjb4U/gAAAACXBI' + - 'WXMAAAHGAAABxgEXwfpGAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAA' + - 'AhNQTFRF////AP//AICAgP//AFVVQECA////K1VVSbbbYL/fJ05idsTYJFtbbcjbJllmZszW' + - 'WMTOIFhoHlNiZszTa9DdUcHNHlNlV8XRIVdiasrUHlZjIVZjaMnVH1RlIFRkH1RkH1ZlasvY' + - 'asvXVsPQH1VkacnVa8vWIVZjIFRjVMPQa8rXIVVkXsXRsNveIFVkIFZlIVVj3eDeh6GmbMvX' + - 'H1ZkIFRka8rWbMvXIFVkIFVjIFVkbMvWH1VjbMvWIFVlbcvWIFVla8vVIFVkbMvWbMvVH1Vk' + - 'bMvWIFVlbcvWIFVkbcvVbMvWjNPbIFVkU8LPwMzNIFVkbczWIFVkbsvWbMvXIFVkRnB8bcvW' + - '2+TkW8XRIFVkIlZlJVloJlpoKlxrLl9tMmJwOWd0Omh1RXF8TneCT3iDUHiDU8LPVMLPVcLP' + - 'VcPQVsPPVsPQV8PQWMTQWsTQW8TQXMXSXsXRX4SNX8bSYMfTYcfTYsfTY8jUZcfSZsnUaIqT' + - 'acrVasrVa8jTa8rWbI2VbMvWbcvWdJObdcvUdszUd8vVeJaee87Yfc3WgJyjhqGnitDYjaar' + - 'ldPZnrK2oNbborW5o9bbo9fbpLa6q9ndrL3ArtndscDDutzfu8fJwN7gwt7gxc/QyuHhy+Hi' + - 'zeHi0NfX0+Pj19zb1+Tj2uXk29/e3uLg3+Lh3+bl4uXj4ufl4+fl5Ofl5ufl5ujm5+jmySDn' + - 'BAAAAFp0Uk5TAAECAgMEBAYHCA0NDg4UGRogIiMmKSssLzU7PkJJT1JTVFliY2hrdHZ3foSF' + - 'hYeJjY2QkpugqbG1tre5w8zQ09XY3uXn6+zx8vT09vf4+Pj5+fr6/P39/f3+gz7SsAAAAVVJ' + - 'REFUOMtjYKA7EBDnwCPLrObS1BRiLoJLnte6CQy8FLHLCzs2QUG4FjZ5GbcmBDDjxJBXDWxC' + - 'Brb8aM4zbkIDzpLYnAcE9VXlJSWlZRU13koIeW57mGx5XjoMZEUqwxWYQaQbSzLSkYGfKFSe' + - '0QMsX5WbjgY0YS4MBplemI4BdGBW+DQ11eZiymfqQuXZIjqwyadPNoSZ4L+0FVM6e+oGI6g8' + - 'a9iKNT3o8kVzNkzRg5lgl7p4wyRUL9Yt2jAxVh6mQCogae6GmflI8p0r13VFWTHBQ0rWPW7a' + - 'hgWVcPm+9cuLoyy4kCJDzCm6d8PSFoh0zvQNC5OjDJhQopPPJqph1doJBUD5tnkbZiUEqaCn' + - 'B3bTqLTFG1bPn71kw4b+GFdpLElKIzRxxgYgWNYc5SCENVHKeUaltHdXx0dZ8uBI1hJ2UUDg' + - 'q82CM2MwKeibqAvSO7MCABq0wXEPiqWEAAAAAElFTkSuQmCC'; - - /** * @param {MapOptions} options Map options. * @return {ol.MapOptionsInternal} Internal map options. @@ -1448,23 +1404,6 @@ _ol_PluggableMap_.createOptionsInternal = function(options) { */ var values = {}; - var logos = {}; - if (options.logo === undefined || - (typeof options.logo === 'boolean' && options.logo)) { - logos[_ol_PluggableMap_.LOGO_URL] = 'https://openlayers.org/'; - } else { - var logo = options.logo; - if (typeof logo === 'string') { - logos[logo] = ''; - } else if (logo instanceof HTMLElement) { - logos[getUid(logo).toString()] = logo; - } else if (logo) { - _ol_asserts_.assert(typeof logo.href == 'string', 44); // `logo.href` should be a string. - _ol_asserts_.assert(typeof logo.src == 'string', 45); // `logo.src` should be a string. - logos[logo.src] = logo.href; - } - } - var layerGroup = (options.layers instanceof _ol_layer_Group_) ? options.layers : new _ol_layer_Group_({layers: options.layers}); values[_ol_MapProperty_.LAYERGROUP] = layerGroup; @@ -1554,7 +1493,6 @@ _ol_PluggableMap_.createOptionsInternal = function(options) { controls: controls, interactions: interactions, keyboardEventTarget: keyboardEventTarget, - logos: logos, overlays: overlays, mapRendererPlugin: mapRendererPlugin, values: values diff --git a/src/ol/control/Attribution.js b/src/ol/control/Attribution.js index 8fd6c85a64..aaaf6e9cc8 100644 --- a/src/ol/control/Attribution.js +++ b/src/ol/control/Attribution.js @@ -1,17 +1,14 @@ /** * @module ol/control/Attribution */ -// FIXME handle date line wrap - import {inherits} from '../index.js'; import _ol_array_ from '../array.js'; import Control from '../control/Control.js'; import _ol_css_ from '../css.js'; -import {removeNode, replaceNode} from '../dom.js'; +import {removeChildren, replaceNode} from '../dom.js'; import _ol_events_ from '../events.js'; import EventType from '../events/EventType.js'; import _ol_layer_Layer_ from '../layer/Layer.js'; -import _ol_obj_ from '../obj.js'; /** * @classdesc @@ -35,15 +32,6 @@ var Attribution = function(opt_options) { */ this.ulElement_ = document.createElement('UL'); - /** - * @private - * @type {Element} - */ - this.logoLi_ = document.createElement('LI'); - - this.ulElement_.appendChild(this.logoLi_); - this.logoLi_.style.display = 'none'; - /** * @private * @type {boolean} @@ -131,12 +119,6 @@ var Attribution = function(opt_options) { */ this.renderedVisible_ = true; - /** - * @private - * @type {Object.} - */ - this.logoElements_ = {}; - }; inherits(Attribution, Control); @@ -231,10 +213,7 @@ Attribution.prototype.updateElement_ = function(frameState) { return; } - // remove everything but the logo - while (this.ulElement_.lastChild !== this.logoLi_) { - this.ulElement_.removeChild(this.ulElement_.lastChild); - } + removeChildren(this.ulElement_); // append the attributions for (var i = 0, ii = attributions.length; i < ii; ++i) { @@ -244,64 +223,13 @@ Attribution.prototype.updateElement_ = function(frameState) { } - if (attributions.length === 0 && this.renderedAttributions_.length > 0) { - this.element.classList.add('ol-logo-only'); - } else if (this.renderedAttributions_.length === 0 && attributions.length > 0) { - this.element.classList.remove('ol-logo-only'); - } - - var visible = attributions.length > 0 || !_ol_obj_.isEmpty(frameState.logos); + var visible = attributions.length > 0; if (this.renderedVisible_ != visible) { this.element.style.display = visible ? '' : 'none'; this.renderedVisible_ = visible; } this.renderedAttributions_ = attributions; - this.insertLogos_(frameState); -}; - - -/** - * @param {?olx.FrameState} frameState Frame state. - * @private - */ -Attribution.prototype.insertLogos_ = function(frameState) { - - var logo; - var logos = frameState.logos; - var logoElements = this.logoElements_; - - for (logo in logoElements) { - if (!(logo in logos)) { - removeNode(logoElements[logo]); - delete logoElements[logo]; - } - } - - var image, logoElement, logoKey; - for (logoKey in logos) { - var logoValue = logos[logoKey]; - if (logoValue instanceof HTMLElement) { - this.logoLi_.appendChild(logoValue); - logoElements[logoKey] = logoValue; - } - if (!(logoKey in logoElements)) { - image = new Image(); - image.src = logoKey; - if (logoValue === '') { - logoElement = image; - } else { - logoElement = document.createElement('a'); - logoElement.href = logoValue; - logoElement.appendChild(image); - } - this.logoLi_.appendChild(logoElement); - logoElements[logoKey] = logoElement; - } - } - - this.logoLi_.style.display = !_ol_obj_.isEmpty(logos) ? '' : 'none'; - }; diff --git a/src/ol/renderer/Layer.js b/src/ol/renderer/Layer.js index c78f789c83..b9f3d82cee 100644 --- a/src/ol/renderer/Layer.js +++ b/src/ol/renderer/Layer.js @@ -5,7 +5,6 @@ import {getUid, inherits, nullFunction} from '../index.js'; import _ol_ImageState_ from '../ImageState.js'; import _ol_Observable_ from '../Observable.js'; import _ol_TileState_ from '../TileState.js'; -import _ol_asserts_ from '../asserts.js'; import _ol_events_ from '../events.js'; import EventType from '../events/EventType.js'; import {FALSE} from '../functions.js'; @@ -166,25 +165,6 @@ _ol_renderer_Layer_.prototype.scheduleExpireCache = function(frameState, tileSou }; -/** - * @param {olx.FrameState} frameState Frame state. - * @param {ol.source.Source} source Source. - * @protected - */ -_ol_renderer_Layer_.prototype.updateLogos = function(frameState, source) { - var logo = source.getLogo(); - if (logo !== undefined) { - if (typeof logo === 'string') { - frameState.logos[logo] = ''; - } else if (logo) { - _ol_asserts_.assert(typeof logo.href == 'string', 44); // `logo.href` should be a string. - _ol_asserts_.assert(typeof logo.src == 'string', 45); // `logo.src` should be a string. - frameState.logos[logo.src] = logo.href; - } - } -}; - - /** * @param {Object.>} usedTiles Used tiles. * @param {ol.source.Tile} tileSource Tile source. diff --git a/src/ol/renderer/canvas/ImageLayer.js b/src/ol/renderer/canvas/ImageLayer.js index 254bb08f3e..41f3c54b6d 100644 --- a/src/ol/renderer/canvas/ImageLayer.js +++ b/src/ol/renderer/canvas/ImageLayer.js @@ -187,7 +187,6 @@ _ol_renderer_canvas_ImageLayer_.prototype.prepareFrame = function(frameState, la 0, -viewCenter[0], -viewCenter[1]); - this.updateLogos(frameState, imageSource); this.renderedResolution = imageResolution * pixelRatio / imagePixelRatio; } diff --git a/src/ol/renderer/canvas/TileLayer.js b/src/ol/renderer/canvas/TileLayer.js index 1804720ef6..c323752b6c 100644 --- a/src/ol/renderer/canvas/TileLayer.js +++ b/src/ol/renderer/canvas/TileLayer.js @@ -292,7 +292,6 @@ _ol_renderer_canvas_TileLayer_.prototype.prepareFrame = function(frameState, lay this.manageTilePyramid(frameState, tileSource, tileGrid, pixelRatio, projection, extent, z, tileLayer.getPreload()); this.scheduleExpireCache(frameState, tileSource); - this.updateLogos(frameState, tileSource); return this.renderedTiles.length > 0; }; diff --git a/src/ol/renderer/canvas/VectorLayer.js b/src/ol/renderer/canvas/VectorLayer.js index 6355eddd15..34b4930754 100644 --- a/src/ol/renderer/canvas/VectorLayer.js +++ b/src/ol/renderer/canvas/VectorLayer.js @@ -299,12 +299,9 @@ _ol_renderer_canvas_VectorLayer_.prototype.handleStyleImageChange_ = function(ev * @inheritDoc */ _ol_renderer_canvas_VectorLayer_.prototype.prepareFrame = function(frameState, layerState) { - var vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer()); var vectorSource = vectorLayer.getSource(); - this.updateLogos(frameState, vectorSource); - var animating = frameState.viewHints[_ol_ViewHint_.ANIMATING]; var interacting = frameState.viewHints[_ol_ViewHint_.INTERACTING]; var updateWhileAnimating = vectorLayer.getUpdateWhileAnimating(); diff --git a/src/ol/renderer/webgl/ImageLayer.js b/src/ol/renderer/webgl/ImageLayer.js index 13f2b3c1d2..feb2017307 100644 --- a/src/ol/renderer/webgl/ImageLayer.js +++ b/src/ol/renderer/webgl/ImageLayer.js @@ -189,8 +189,6 @@ _ol_renderer_webgl_ImageLayer_.prototype.prepareFrame = function(frameState, lay this.image_ = image; this.texture = texture; - - this.updateLogos(frameState, imageSource); } return !!image; diff --git a/src/ol/renderer/webgl/TileLayer.js b/src/ol/renderer/webgl/TileLayer.js index ce898fc958..2cdb5a7da6 100644 --- a/src/ol/renderer/webgl/TileLayer.js +++ b/src/ol/renderer/webgl/TileLayer.js @@ -354,7 +354,6 @@ _ol_renderer_webgl_TileLayer_.prototype.prepareFrame = function(frameState, laye } }, this); this.scheduleExpireCache(frameState, tileSource); - this.updateLogos(frameState, tileSource); var texCoordMatrix = this.texCoordMatrix; _ol_transform_.reset(texCoordMatrix); diff --git a/src/ol/renderer/webgl/VectorLayer.js b/src/ol/renderer/webgl/VectorLayer.js index 4486e7cfb5..793fb43e9d 100644 --- a/src/ol/renderer/webgl/VectorLayer.js +++ b/src/ol/renderer/webgl/VectorLayer.js @@ -212,12 +212,9 @@ _ol_renderer_webgl_VectorLayer_.prototype.handleStyleImageChange_ = function(eve * @inheritDoc */ _ol_renderer_webgl_VectorLayer_.prototype.prepareFrame = function(frameState, layerState, context) { - var vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer()); var vectorSource = vectorLayer.getSource(); - this.updateLogos(frameState, vectorSource); - var animating = frameState.viewHints[_ol_ViewHint_.ANIMATING]; var interacting = frameState.viewHints[_ol_ViewHint_.INTERACTING]; var updateWhileAnimating = vectorLayer.getUpdateWhileAnimating(); diff --git a/src/ol/source/BingMaps.js b/src/ol/source/BingMaps.js index 71078d0e7a..5c17e20aa3 100644 --- a/src/ol/source/BingMaps.js +++ b/src/ol/source/BingMaps.js @@ -125,11 +125,6 @@ _ol_source_BingMaps_.prototype.handleImageryMetadataResponse = function(response return; } - var brandLogoUri = response.brandLogoUri; - if (brandLogoUri.indexOf('https') == -1) { - brandLogoUri = brandLogoUri.replace('http', 'https'); - } - //var copyright = response.copyright; // FIXME do we need to display this? var resource = response.resourceSets[0].resources[0]; var maxZoom = this.maxZoom_ == -1 ? resource.zoomMax : this.maxZoom_; @@ -209,8 +204,6 @@ _ol_source_BingMaps_.prototype.handleImageryMetadataResponse = function(response }); } - this.setLogo(brandLogoUri); - this.setState(_ol_source_State_.READY); }; export default _ol_source_BingMaps_; diff --git a/src/ol/source/CartoDB.js b/src/ol/source/CartoDB.js index 9b4c952f3f..9a88a0fbc1 100644 --- a/src/ol/source/CartoDB.js +++ b/src/ol/source/CartoDB.js @@ -45,7 +45,6 @@ var _ol_source_CartoDB_ = function(options) { attributions: options.attributions, cacheSize: options.cacheSize, crossOrigin: options.crossOrigin, - logo: options.logo, maxZoom: options.maxZoom !== undefined ? options.maxZoom : 18, minZoom: options.minZoom, projection: options.projection, diff --git a/src/ol/source/Cluster.js b/src/ol/source/Cluster.js index d979642af4..c0f0415182 100644 --- a/src/ol/source/Cluster.js +++ b/src/ol/source/Cluster.js @@ -26,7 +26,6 @@ var _ol_source_Cluster_ = function(options) { _ol_source_Vector_.call(this, { attributions: options.attributions, extent: options.extent, - logo: options.logo, projection: options.projection, wrapX: options.wrapX }); diff --git a/src/ol/source/Image.js b/src/ol/source/Image.js index a25485d6d0..6682fd1489 100644 --- a/src/ol/source/Image.js +++ b/src/ol/source/Image.js @@ -27,7 +27,6 @@ var _ol_source_Image_ = function(options) { _ol_source_Source_.call(this, { attributions: options.attributions, extent: options.extent, - logo: options.logo, projection: options.projection, state: options.state }); diff --git a/src/ol/source/ImageArcGISRest.js b/src/ol/source/ImageArcGISRest.js index 0884af5903..752939d9fe 100644 --- a/src/ol/source/ImageArcGISRest.js +++ b/src/ol/source/ImageArcGISRest.js @@ -32,7 +32,6 @@ var _ol_source_ImageArcGISRest_ = function(opt_options) { _ol_source_Image_.call(this, { attributions: options.attributions, - logo: options.logo, projection: options.projection, resolutions: options.resolutions }); diff --git a/src/ol/source/ImageCanvas.js b/src/ol/source/ImageCanvas.js index b34332f290..26a98e7f44 100644 --- a/src/ol/source/ImageCanvas.js +++ b/src/ol/source/ImageCanvas.js @@ -19,7 +19,6 @@ var _ol_source_ImageCanvas_ = function(options) { _ol_source_Image_.call(this, { attributions: options.attributions, - logo: options.logo, projection: options.projection, resolutions: options.resolutions, state: options.state diff --git a/src/ol/source/ImageStatic.js b/src/ol/source/ImageStatic.js index 92f447e9a8..8fc7e1a3a0 100644 --- a/src/ol/source/ImageStatic.js +++ b/src/ol/source/ImageStatic.js @@ -32,7 +32,6 @@ var _ol_source_ImageStatic_ = function(options) { _ol_source_Image_.call(this, { attributions: options.attributions, - logo: options.logo, projection: getProjection(options.projection) }); diff --git a/src/ol/source/ImageWMS.js b/src/ol/source/ImageWMS.js index 2e95ee12c1..d763549291 100644 --- a/src/ol/source/ImageWMS.js +++ b/src/ol/source/ImageWMS.js @@ -33,7 +33,6 @@ var _ol_source_ImageWMS_ = function(opt_options) { _ol_source_Image_.call(this, { attributions: options.attributions, - logo: options.logo, projection: options.projection, resolutions: options.resolutions }); diff --git a/src/ol/source/Raster.js b/src/ol/source/Raster.js index 271ddfc55a..9cd81af915 100644 --- a/src/ol/source/Raster.js +++ b/src/ol/source/Raster.js @@ -113,7 +113,6 @@ var _ol_source_Raster_ = function(options) { index: 0, layerStates: layerStates, layerStatesArray: layerStatesArray, - logos: {}, pixelRatio: 1, pixelToCoordinateTransform: _ol_transform_.create(), postRenderFunctions: [], diff --git a/src/ol/source/Source.js b/src/ol/source/Source.js index 233cc49df7..9db8b45901 100644 --- a/src/ol/source/Source.js +++ b/src/ol/source/Source.js @@ -7,13 +7,6 @@ import {get as getProjection} from '../proj.js'; import _ol_source_State_ from '../source/State.js'; -/** - * Object literal with config options for the map logo. - * @typedef {{href: (string), src: (string)}} - */ -export var LogoOptions; - - /** * @classdesc * Abstract base class; normally only used for creating subclasses and not @@ -44,12 +37,6 @@ var _ol_source_Source_ = function(options) { */ this.attributions_ = this.adaptAttributions_(options.attributions); - /** - * @private - * @type {string|LogoOptions|undefined} - */ - this.logo_ = options.logo; - /** * @private * @type {ol.source.State} @@ -114,16 +101,6 @@ _ol_source_Source_.prototype.getAttributions = function() { }; -/** - * Get the logo of the source. - * @return {string|LogoOptions|undefined} Logo. - * @api - */ -_ol_source_Source_.prototype.getLogo = function() { - return this.logo_; -}; - - /** * Get the projection of the source. * @return {ol.proj.Projection} Projection. @@ -181,15 +158,6 @@ _ol_source_Source_.prototype.setAttributions = function(attributions) { }; -/** - * Set the logo of the source. - * @param {string|LogoOptions|undefined} logo Logo. - */ -_ol_source_Source_.prototype.setLogo = function(logo) { - this.logo_ = logo; -}; - - /** * Set the state of the source. * @param {ol.source.State} state State. diff --git a/src/ol/source/Tile.js b/src/ol/source/Tile.js index abd4f24243..f9172a30d3 100644 --- a/src/ol/source/Tile.js +++ b/src/ol/source/Tile.js @@ -28,7 +28,6 @@ var _ol_source_Tile_ = function(options) { _ol_source_Source_.call(this, { attributions: options.attributions, extent: options.extent, - logo: options.logo, projection: options.projection, state: options.state, wrapX: options.wrapX diff --git a/src/ol/source/TileArcGISRest.js b/src/ol/source/TileArcGISRest.js index 98e740bf06..f285ab9dfc 100644 --- a/src/ol/source/TileArcGISRest.js +++ b/src/ol/source/TileArcGISRest.js @@ -32,7 +32,6 @@ var _ol_source_TileArcGISRest_ = function(opt_options) { attributions: options.attributions, cacheSize: options.cacheSize, crossOrigin: options.crossOrigin, - logo: options.logo, projection: options.projection, reprojectionErrorThreshold: options.reprojectionErrorThreshold, tileGrid: options.tileGrid, diff --git a/src/ol/source/TileImage.js b/src/ol/source/TileImage.js index a269fd9c57..f962145d45 100644 --- a/src/ol/source/TileImage.js +++ b/src/ol/source/TileImage.js @@ -30,7 +30,6 @@ var _ol_source_TileImage_ = function(options) { attributions: options.attributions, cacheSize: options.cacheSize, extent: options.extent, - logo: options.logo, opaque: options.opaque, projection: options.projection, state: options.state, diff --git a/src/ol/source/TileWMS.js b/src/ol/source/TileWMS.js index 68d25abd6c..a199dd61c1 100644 --- a/src/ol/source/TileWMS.js +++ b/src/ol/source/TileWMS.js @@ -38,7 +38,6 @@ var _ol_source_TileWMS_ = function(opt_options) { attributions: options.attributions, cacheSize: options.cacheSize, crossOrigin: options.crossOrigin, - logo: options.logo, opaque: !transparent, projection: options.projection, reprojectionErrorThreshold: options.reprojectionErrorThreshold, diff --git a/src/ol/source/UrlTile.js b/src/ol/source/UrlTile.js index 623f4c665c..1eae93a55a 100644 --- a/src/ol/source/UrlTile.js +++ b/src/ol/source/UrlTile.js @@ -24,7 +24,6 @@ var _ol_source_UrlTile_ = function(options) { attributions: options.attributions, cacheSize: options.cacheSize, extent: options.extent, - logo: options.logo, opaque: options.opaque, projection: options.projection, state: options.state, diff --git a/src/ol/source/Vector.js b/src/ol/source/Vector.js index ba4444019d..478cbfb999 100644 --- a/src/ol/source/Vector.js +++ b/src/ol/source/Vector.js @@ -39,7 +39,6 @@ var _ol_source_Vector_ = function(opt_options) { _ol_source_Source_.call(this, { attributions: options.attributions, - logo: options.logo, projection: undefined, state: _ol_source_State_.READY, wrapX: options.wrapX !== undefined ? options.wrapX : true diff --git a/src/ol/source/VectorTile.js b/src/ol/source/VectorTile.js index e16bbc8ea3..0d4137c636 100644 --- a/src/ol/source/VectorTile.js +++ b/src/ol/source/VectorTile.js @@ -42,7 +42,6 @@ var _ol_source_VectorTile_ = function(options) { attributions: options.attributions, cacheSize: options.cacheSize !== undefined ? options.cacheSize : 128, extent: extent, - logo: options.logo, opaque: false, projection: projection, state: options.state, diff --git a/src/ol/source/WMTS.js b/src/ol/source/WMTS.js index e5a1dbea69..1ca6f03246 100644 --- a/src/ol/source/WMTS.js +++ b/src/ol/source/WMTS.js @@ -159,7 +159,6 @@ var _ol_source_WMTS_ = function(options) { attributions: options.attributions, cacheSize: options.cacheSize, crossOrigin: options.crossOrigin, - logo: options.logo, projection: options.projection, reprojectionErrorThreshold: options.reprojectionErrorThreshold, tileClass: options.tileClass, diff --git a/src/ol/source/XYZ.js b/src/ol/source/XYZ.js index dfc5496a77..021928d1cb 100644 --- a/src/ol/source/XYZ.js +++ b/src/ol/source/XYZ.js @@ -44,7 +44,6 @@ var _ol_source_XYZ_ = function(opt_options) { attributions: options.attributions, cacheSize: options.cacheSize, crossOrigin: options.crossOrigin, - logo: options.logo, opaque: options.opaque, projection: projection, reprojectionErrorThreshold: options.reprojectionErrorThreshold, diff --git a/src/ol/source/Zoomify.js b/src/ol/source/Zoomify.js index ae7f4d88e0..f3f08c2ddf 100644 --- a/src/ol/source/Zoomify.js +++ b/src/ol/source/Zoomify.js @@ -141,7 +141,6 @@ var _ol_source_Zoomify_ = function(opt_options) { attributions: options.attributions, cacheSize: options.cacheSize, crossOrigin: options.crossOrigin, - logo: options.logo, projection: options.projection, reprojectionErrorThreshold: options.reprojectionErrorThreshold, tileClass: ZoomifyTileClass, diff --git a/src/ol/typedefs.js b/src/ol/typedefs.js index 60c7569c04..4e51dfd1b0 100644 --- a/src/ol/typedefs.js +++ b/src/ol/typedefs.js @@ -440,7 +440,6 @@ ol.LRUCacheEntry; * @typedef {{controls: (ol.Collection.|undefined), * interactions: (ol.Collection.|undefined), * keyboardEventTarget: (Element|Document), - * logos: (Object.), * overlays: ol.Collection., * mapRendererPlugin: olx.MapRendererPlugin, * values: Object.}} @@ -616,7 +615,6 @@ ol.SnapSegmentDataType; /** * @typedef {{attributions: (ol.AttributionLike|undefined), * extent: (null|ol.Extent|undefined), - * logo: (string|olx.LogoOptions|undefined), * projection: ol.ProjectionLike, * resolutions: (Array.|undefined), * state: (ol.source.State|undefined)}} @@ -634,7 +632,6 @@ ol.SourceRasterRenderedState; /** * @typedef {{attributions: (ol.AttributionLike|undefined), - * logo: (string|olx.LogoOptions|undefined), * projection: ol.ProjectionLike, * state: (ol.source.State|undefined), * wrapX: (boolean|undefined)}} @@ -646,7 +643,6 @@ ol.SourceSourceOptions; * @typedef {{attributions: (ol.AttributionLike|undefined), * cacheSize: (number|undefined), * extent: (ol.Extent|undefined), - * logo: (string|olx.LogoOptions|undefined), * opaque: (boolean|undefined), * tilePixelRatio: (number|undefined), * projection: ol.ProjectionLike, @@ -662,7 +658,6 @@ ol.SourceTileOptions; * @typedef {{attributions: (ol.AttributionLike|undefined), * cacheSize: (number|undefined), * extent: (ol.Extent|undefined), - * logo: (string|olx.LogoOptions|undefined), * opaque: (boolean|undefined), * projection: ol.ProjectionLike, * state: (ol.source.State|undefined), diff --git a/test/spec/ol/control/attribution.test.js b/test/spec/ol/control/attribution.test.js index 5fbafcdc9d..0ea32bb523 100644 --- a/test/spec/ol/control/attribution.test.js +++ b/test/spec/ol/control/attribution.test.js @@ -70,7 +70,7 @@ describe('ol.control.Attribution', function() { it('does not add duplicate attributions', function() { map.renderSync(); var attribution = map.getTarget().querySelectorAll('.ol-attribution li'); - expect(attribution.length).to.be(3); // first
  • is the logo + expect(attribution.length).to.be(2); }); });